Hi, On Wed, 28 Jan 2004 11:17:52 +1100 (EST) <[EMAIL PROTECTED]> wrote:
> Hi there regarding out discussions before about using isset, i > set function params which are false intitalially as null ie > function foo ($bar = null) , anyway $bar remains true both ways > if i do isset($bar), i didnt notice this assuming it was ok, > now the scripts are buggered, it was originally like if($bar) > which worked fine. Is there a better way to check ? Hmm.. It's always FALSE here. (Unless there something wrong with my test code.) Here's what I used: (Run on the command line...) <?php function check_if_set ($my_null_variable = NULL) { if (isset($my_null_variable)) { echo 'Yes!'; } else { echo 'No!'; } } check_if_set(); echo "\n"; ?> -- - E - __________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php