View Single Post
Old 02-01-2008, 10:51 PM   #7 (permalink)
buildakicker
The Acquainted
 
buildakicker's Avatar
 
Join Date: Jan 2008
Posts: 119
Thanks: 21
buildakicker is on a distinguished road
Smile

Thanks for the post. Is that system more streamlined that what I have?

Quote:
Originally Posted by Salathe View Post
How about:
PHP Code:
<?php header('Content-Type: text/plain; charset=UTF-8');

$comments = array();

$fp fopen('comments.txt''r+');
if ( ! 
$fp) die ('Unable to load comments');
while ( ! 
feof($fp) && $comments[] = array_filter(fgetcsv($fp2048'|')));
fclose($fp);


foreach (
$comments as $comment)
{
    
$comment array_combine(array('user''date''body'), array_values($comment));
    echo 
'Who posted: '$comment['user'], "\n",
         
'Date: '$comment['date'], "\n",
         
'Comment: '$comment['body'], "\n\n";
}
The important one being line 7: while ....
__________________
SkiLeases.com
buildakicker is offline  
Reply With Quote