Im a pretty decent PHP "coder";
I'm currently working on my own flat file blog (so its custom.....)
For blog comments,
In stead of creating a new txt file for each post, I want just one.
My problem is, reading the comments, heres what I've come up with so far:
<?php
define(COMMENTS, "comments.txt");
foreach($comments as $dbRows) {
list($name, $url, $datePosted, $comment, $ip, $title) = explode("||", $dbRows);
if($title == $t) {
echo $comment;
}
}
?>
The problem is when I run that query it only show the data i request from one
..... heres an example
John||@||time()||Hello!||00.000.000.00||First Post
Smith||smith@domain.com||time()||Hi!||First Post
Riley||@||time()||Hola!||Second
when that query run, it will only read one line where $title = First Post
I want it to read all lines like that
and if it the title, for example - Second, I want it only display the rows with the same title 'Second'
HELP WILL BE GREATLY APPRECIATED.
Hope this isnt to confusing =\