3raser Posted June 12, 2010 Share Posted June 12, 2010 Is this the incorrect use of !empty? if (!empty($design2, $designt2, $grammar2, $grammart2, $layout2, $layoutt2, $moderation2, $moderationt2, $activity2, $activityt2, $overall2, $overallt2)) { Quote Link to comment https://forums.phpfreaks.com/topic/204542-incorrect-use/ Share on other sites More sharing options...
dabaR Posted June 12, 2010 Share Posted June 12, 2010 Yes. You can write if(!empty($d) && !empty($f) ...). See more here: http://ca2.php.net/empty Quote Link to comment https://forums.phpfreaks.com/topic/204542-incorrect-use/#findComment-1071020 Share on other sites More sharing options...
trq Posted June 12, 2010 Share Posted June 12, 2010 Is this the incorrect use of !empty? if (!empty($design2, $designt2, $grammar2, $grammart2, $layout2, $layoutt2, $moderation2, $moderationt2, $activity2, $activityt2, $overall2, $overallt2)) { No. empty only excepts one argument. Quote Link to comment https://forums.phpfreaks.com/topic/204542-incorrect-use/#findComment-1071024 Share on other sites More sharing options...
3raser Posted June 12, 2010 Author Share Posted June 12, 2010 Couldn't I just use: if (!$value) Quote Link to comment https://forums.phpfreaks.com/topic/204542-incorrect-use/#findComment-1071026 Share on other sites More sharing options...
dabaR Posted June 12, 2010 Share Posted June 12, 2010 You could. Here is what the manual says: empty() is the opposite of (boolean) var, except that no warning is generated when the variable is not set. Quote Link to comment https://forums.phpfreaks.com/topic/204542-incorrect-use/#findComment-1071110 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.