shiyam198 Posted September 1, 2008 Share Posted September 1, 2008 Hi Guys, I have the code (below) to create a drop down menu from the "lkgroup" column from the table - lk_group. But it is giving me the error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING Any help is appreciated. Thanks, Shiyam <SELECT NAME="group"> <?php while($row = mysql_fetch_array( $result )) { echo "<option VALUE=\"$row[\'lkgroup\']\">$row[\'lkgroup\']</option>"; # echo $row['lkgroup']. "<br/>"; } ?> </SELECT> Link to comment https://forums.phpfreaks.com/topic/122179-downdown-list-php/ Share on other sites More sharing options...
spfoonnewb Posted September 1, 2008 Share Posted September 1, 2008 Try this: <SELECT NAME="group"> <?php while($row = mysql_fetch_array( $result )) { echo "<option VALUE=\"{$row['lkgroup']}\">{$row['lkgroup']}</option>"; } ?> </SELECT> Link to comment https://forums.phpfreaks.com/topic/122179-downdown-list-php/#findComment-630754 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.