Fenhopi Posted December 14, 2010 Share Posted December 14, 2010 First of all, the field that holds prefgender does not say "Not added yet". Yet when I do this, it doesn't echo the info: $prefgender = $req_user_info['prefgender']; if(!$prefgender == "Not added yet"){ ?> <tr> <td>Preferred gender:</td> <td><? echo $req_user_info['prefgender'] ?></td> </tr> <? } Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/221613-need-help-with-if-statement-should-be-easy/ Share on other sites More sharing options...
trq Posted December 14, 2010 Share Posted December 14, 2010 if($prefgender != "Not added yet"){ ?> Quote Link to comment https://forums.phpfreaks.com/topic/221613-need-help-with-if-statement-should-be-easy/#findComment-1147115 Share on other sites More sharing options...
MMDE Posted December 14, 2010 Share Posted December 14, 2010 You should read some of the documentation if you wonder about the different operators. http://www.php.net/manual/en/language.operators.comparison.php Quote Link to comment https://forums.phpfreaks.com/topic/221613-need-help-with-if-statement-should-be-easy/#findComment-1147117 Share on other sites More sharing options...
Fenhopi Posted December 14, 2010 Author Share Posted December 14, 2010 Thanks guys! Quote Link to comment https://forums.phpfreaks.com/topic/221613-need-help-with-if-statement-should-be-easy/#findComment-1147305 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.