Parse error: parse error, unexpected T_VARIABLE in [path to php] on line 175Code:$j = 0; line 175 while(file_exists('single_forum|'.stripslashes($_POST['forum']).'|'.$j.'|.html')){ include('single_forum|'.stripslashes($_POST['forum']).'|'$j'|.html'); $j = $j + 1; }; $k = fopen($newforumname, 'w') or die("can't open file"); fwrite($messageformated, $k); fclose($k);
This code is for the forum I'm trying to make. The messages will be called "single_forum|[forum name]|[message number]|.html". The variable "$j" is the massage number. It starts as 0. Then, I check to see if the post with $j exists. If it does, I write it to the PHP. Then I increase $j and start over again. If it doesn't exist, I create it. It seems like it should work fine. But, it gives me that ugly error. I've checked for semicolons (I always forget them) but they seem to all be there. What's my problem?


Reply With Quote
Bookmarks