Im using this PHP to display the contents or text files held in a directory, the text files all follow the same format.
$contents = file_get_contents($filename);
$items = explode('¬', $contents);
echo '<table width="500" border="1" cellpadding="4">';
foreach ($items as $item) {
echo "<tr><td>$item</td></tr>\n";
}
echo '</table>';
There are 7 $items in each text file:
tag,name,description,text1,text2,text3,date
So instead of outputting $item, can i give each its own variable?
Thanks.
Try this: