Loop separated text into variables

Pro

New Member
Im using this PHP to display the contents or text files held in a directory, the text files all follow the same format.\[code\]$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>';\[/code\]There are 7 $items in each text file:tag,name,description,text1,text2,text3,dateSo instead of outputting $item, can i give each its own variable?Thanks.
 
Back
Top