etrader Posted April 29, 2011 Share Posted April 29, 2011 I introduce if condition when a string is empty as if (empty($string)) { How I can add the condition for a certain value too. If empty or equal to "word1". Link to comment https://forums.phpfreaks.com/topic/235061-if-empty-for-equal-to-a-given-value/ Share on other sites More sharing options...
Undrium Posted April 29, 2011 Share Posted April 29, 2011 if (empty($string) || $string == "word1") { || means "or". Link to comment https://forums.phpfreaks.com/topic/235061-if-empty-for-equal-to-a-given-value/#findComment-1208036 Share on other sites More sharing options...
etrader Posted April 29, 2011 Author Share Posted April 29, 2011 Thanks a lot! Link to comment https://forums.phpfreaks.com/topic/235061-if-empty-for-equal-to-a-given-value/#findComment-1208037 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.