Re: [PHP] assigning NULL to a variable

2004-04-07 Thread Justin Patrin
Marek Kilimajer wrote: William Lovaton wrote: El mar, 06-04-2004 a las 07:41, Marek Kilimajer escribió: Andy B wrote: how would you assign NULL to a variable if its original value is ""? otherwise leave it with its value... if($var === '') $var = NULL; what about: if ($var == '') unset($v

Re: [PHP] assigning NULL to a variable

2004-04-07 Thread Marek Kilimajer
William Lovaton wrote: El mar, 06-04-2004 a las 07:41, Marek Kilimajer escribió: Andy B wrote: how would you assign NULL to a variable if its original value is ""? otherwise leave it with its value... if($var === '') $var = NULL; what about: if ($var == '') unset($var); No - NULL is not the s

Re: [PHP] assigning NULL to a variable

2004-04-06 Thread William Lovaton
El mar, 06-04-2004 a las 07:41, Marek Kilimajer escribió: > Andy B wrote: > > how would you assign NULL to a variable if its original value is ""? otherwise > > leave it with its value... > > if($var === '') $var = NULL; what about: if ($var == '') unset($var); -William -- PHP General Maili

Re: [PHP] assigning NULL to a variable

2004-04-06 Thread Marek Kilimajer
Andy B wrote: how would you assign NULL to a variable if its original value is ""? otherwise leave it with its value... if($var === '') $var = NULL; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] assigning NULL to a variable

2004-04-05 Thread Andy B
how would you assign NULL to a variable if its original value is ""? otherwise leave it with its value... the form im working on has a date field called "date" on the form itself. that "date" will get turned into $_SESSION[add][date] on the next page... i want it so if the person filling out the