PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
If you are testing for a NULL value you can use is_null(), however, if you are testing to see if a variable is empty (as you are) then you should use empty().
empty() is the opposite of ==TRUE
therefor an empty string like '' is empty as is the number 0 and the values FALSE & NULL.
is_null() only checks for NULL.
Excuse me, volka.I do not understand about 'empty() is the opposite of ==TRUE'. Is that mean 'If (empty($a))' is the same as 'If $a == FALSE'? That's puzzled.