echo "<table>"; $fcontents = file ("your.txt"); while (list (, $line) = each ($fcontents)) { list($a1,$a2,$a3) = split(" ",$line); echo "<tr><td>$a1<td>$a2<td>$a3"; }