split() and file() contents into a table
Posted: Sat Oct 14, 2006 7:45 pm
feyd | Please use
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Using a comma delimited file ("lab13.txt), I need to split by (,) and then output the results into a table that is 6 columns and 10 rows. I got as far as the "<td>". How do I get the table, the TR and the TD?Code: Select all
<?php
$fileContentsArray=file("lab13.txt");
foreach($fileContentsArray as $one_persons_data)
{
$A1=split(",", $one_persons_data);
foreach($A1 as $contents)
echo "<td>" .$contents . "</td>";
}
}
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]