kdreg Posted June 21, 2007 Share Posted June 21, 2007 Hi, I'm trying to follow along in a tutorial, but I don't recognize part of it (sorry, I can't post in code... this forum doesn't maintain my cookies or allow me to do any text options): $result = mysql_query('SELECT category_id,category_name FROM gallery_category'); while($row = mysql_fetch_array($result)) { $photo_category_list .= <<<__HTML_END <option value="$row[0]">$row[1]</option>\n __HTML_END; } mysql_free_result( $result ); this part: $photo_category_list .= <<<__HTML_END is throwing up this error: Parse error: syntax error, unexpected T_SL in /home/something/public_html/preupload.php on line 15 should the ___HTML_END not be there? I've never encountered an unexpected T_SL error before, or <<< for that matter. Thank you for any assistance. Quote Link to comment Share on other sites More sharing options...
Renlok Posted June 21, 2007 Share Posted June 21, 2007 try renaming both cases of __HTML_END to something like CODE it doesnt really matter what aslong as there both the same. $photo_category_list .= <<<__HTML_END <option value="$row[0]">$row[1]</option>\n __HTML_END; thats just another way to store html. Quote Link to comment Share on other sites More sharing options...
kdreg Posted June 21, 2007 Author Share Posted June 21, 2007 Thank you, Renlok. It actually turned out to be in this case that there was a space after the HTML_END and that was causing the problem. Well, that's interesting, about that being another way to store html. It really threw me! Thanks again... Quote Link to comment Share on other sites More sharing options...
Renlok Posted June 24, 2007 Share Posted June 24, 2007 np ^^ glad i could be of help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.