fopen in html table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rpapaiof
    New Member
    • Oct 2006
    • 27

    fopen in html table

    <?php

    $f=fopen("C:\Pr ogram Files\Apache Group\Apache2\h tdocs\file.txt" ,"r");
    $str=fgets($f);

    echo "<table border=2 width=800 bordercolor=gre en>

    <tr>

    <td>NO</td>

    <td> User </td>

    <td>Pass</td>

    <td>Name</td>

    <td>Lname</td>

    <td>Birthday</td>

    </tr>



    <tr>

    <td>001</td>

    <td colspan=4 width=800 >&nbsp;$str</td>



    </tr>

    <tr>

    <td>001</td>

    <td colspan=4>&nbsp ;$str</td>



    </tr> <tr>

    <td>001</td>

    <td colspan=4>&nbsp ;$str</td>



    </tr> <tr>

    <td>001</td>

    <td colspan=4>&nbsp ;$str</td>



    </tr> <tr>

    <td>001</td>

    <td colspan=4>&nbsp ;$str</td>



    </tr>
    </table>";

    if i have such code in php and i want to read a new line from a file and print it in next line of table what i have to do

    the txt file include this lines:
    romik:rrr:Romik :Papelyan:1985-01-21
    ara ght:Ara:Gabriel yan:1986-04-02:
    meghedi:mmm:Meg hedi:Patatanyan :1977-12-16:
    marlen:july:Mar len:avudyan:198 0-09-07:
    krikor:varsa:Kr ikor:Gafalyan:1 987-09-08:
    Vahe:mode:Vahe: Nersisyan:1975-10-02:


    i colspan the rows but it's better to have a single column for each value
    please help me with this
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    This is your 14th post in this forum, so you know the rules by now:

    Read the Posting Guidelines at the top of this forum!! And apply the part that talks about enclosing code within TAGS to your code shown!

    This is also a continuation or a double posting of another thread you started but did not close or end-reply to, i.e. http://www.thescripts.com/forum/thread560838.html . What are you doing about that one?

    Ronald :cool:

    Comment

    Working...