Arrays
Posted: Tue May 12, 2009 10:15 pm
I am trying to manipulate an array from a output text file.
It is from a form, and so far it outputs onto only one line.
Here is the code im using
This will only make the first two elements into an array, $name and $comment, but ignores the rest.
Is there anyway to make new lines in the output, or include the rest of the output and not only the first two elements?
It is from a form, and so far it outputs onto only one line.
Here is the code im using
Code: Select all
<?php
$commenttext=file_get_contents("d:\hshome\c239198\local54memberforum.com\info.txt");
list($name, $comment) = split("\t", $commenttext);
while (list($name, comment) = split("\t", $commenttext);
echo "<tr>".
"<td>$name</td>\n"."</tr>\n"."<tr>"."<td>$comment</td>\n"."</tr>\n";
?>
Is there anyway to make new lines in the output, or include the rest of the output and not only the first two elements?