Vote Up 0 Vote Down

In any case better to use isset /! empty?

In any case better to use isset /! Empty? The idea is to process the form is suitable only! Empty, since for registration of data fields to be filled, and that's what can be useful isset?


Vote Up 0 Vote Down
Read Mana: isset() and empty() .

isset() checks the following - whether it is a variable set?
Ie return true even if the variable is an empty string:
$var = ''; if(isset($var)) print 'True';

empty() checks the following - if the variable is not empty?
Ie returns true only if a variable is something there:
$var = ''; if(empty($var)) print 'True' else print 'Hello?';
flag | link |

Your Answer

Login before answering

Login with facebook