PHP's empty() returns true if its argument isn't initialized. So, for example, doing the following is redundant and wastes time:
isset($data['comments']) && !empty($data['comments'])
DooPHP IRC channel
//it's never defined anywhere before
if(!empty($data['comments'])){
}if( isset($data['comments']) && !empty($data['comments']) ){
}if( !empty($data['comments']) && isset($data['comments']) ){
}<?php
error_reporting(E_ALL | E_STRICT);
echo empty($data['message']);
?>isset($data['comments']) && !empty($data['comments'])Return to General Web Development Topics
Users browsing this forum: No registered users and 1 guest