iBlizz Posted May 3, 2009 Share Posted May 3, 2009 This is the only code that I changed in my file... while ($state = mysql_fetch_array($allStates)) { if ($state['id'] == (int)$searchValue) { echo "<option selected=\"selected\" value=\"" . $state['id'] . "\">" . $state['state'] . "</option>"; } else { echo "<option value=\"" . $state['id'] . "\">" . $state['state'] . "</option>"; } Now I'm getting the following error, can't seem to figure it out. Is there something wrong with the above code? Appreciate any input on this. Parse error: syntax error, unexpected $end in /home/xboxemba/public_html/searchResults.php on line 89 Link to comment https://forums.phpfreaks.com/topic/156647-solved-help-with-if-statement/ Share on other sites More sharing options...
iBlizz Posted May 3, 2009 Author Share Posted May 3, 2009 I spent a good 20 minutes looking over this and didn't figure it out. The minute after I post a thread here I see I was missing a closing bracket. Wow... Thanks anyway, . Link to comment https://forums.phpfreaks.com/topic/156647-solved-help-with-if-statement/#findComment-824822 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.