I know that topic title is kinda bad, but whateva. Anyway, I have one file named test.txt and Inside it I have content like this:
Evilzone , http://www.evilzone.org , 789456
Krstarica , http://www.krstarica.com , 789456
Facebook , http://www.facebook.com , 147852
Twitter , http://www.twitter.com , 258963
First one is forum Name, second one is URL and third one is password. Now, my question is, is it good to use this code to print table for HTML:
<!doctype html>
<html>
<head>
</head>
<body>
<?php
$file = "test.txt";
$fContent = file_get_contents($file);
$fContent = explode("\n",$fContent);
foreach($fContent as $key => $value) {
$tEverything[$key] = explode(",",$value);
}
echo "<table width=600 border=1>";
for($i = 0;$i < count($tEverything);$i++) {
echo "<tr>";
for($j = 0; $j < 3; $j++) {
echo "
<td>{$tEverything[$i][$j]}</td>";
}
echo "</tr>";
}
echo "</table>";
?>
</body>
</html>
I am curious , is there shorter way to do this, but to print result as I wanted.