Jump to content

[SOLVED] Is this part of the script code or ????


kdreg

Recommended Posts

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.

 

 

 

 

 

 

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.