<?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 > $str</td>
</tr>
<tr>
<td>001</td>
<td colspan=4>  ;$str</td>
</tr> <tr>
<td>001</td>
<td colspan=4>  ;$str</td>
</tr> <tr>
<td>001</td>
<td colspan=4>  ;$str</td>
</tr> <tr>
<td>001</td>
<td colspan=4>  ;$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
$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 > $str</td>
</tr>
<tr>
<td>001</td>
<td colspan=4>  ;$str</td>
</tr> <tr>
<td>001</td>
<td colspan=4>  ;$str</td>
</tr> <tr>
<td>001</td>
<td colspan=4>  ;$str</td>
</tr> <tr>
<td>001</td>
<td colspan=4>  ;$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
Comment