Jump to content

[SOLVED] Help with IF statement


iBlizz

Recommended Posts

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

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.