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? 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"){ ?> 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 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! 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
Archived
This topic is now archived and is closed to further replies.