Re: [PHP] isset($var) && !empty($var) same time!

2002-08-03 Thread Verdana Musone
I had given a try on your code, But it really output "1", a true value. I used "PHP 4.2.2+Apache 1.3.26" under Win2K. And u? - Original Message - From: lallous Sent: 2002Äê8ÔÂ3ÈÕ 16:19 To: [EMAIL PROTECTED] Subject: Re: [PHP] isset($var) && !empty($v

Re: [PHP] isset($var) && !empty($var) same time!

2002-08-03 Thread lallous
lallous Sent: 2002Äê8ÔÂ3ÈÕ 15:01 To: [EMAIL PROTECTED] Subject: Re: [PHP] isset($var) && !empty($var) same time! Just use empty() ?! With error_reporting(E_ALL) you'll get a bunch of warnings if you only use empty() w/o the isset() ! use isset() first and then check wheter empty o

Re: [PHP] isset($var) && !empty($var) same time!

2002-08-03 Thread Verdana Musone
first. - Original Message - From: lallous Sent: 2002Äê8ÔÂ3ÈÕ 15:01 To: [EMAIL PROTECTED] Subject: Re: [PHP] isset($var) && !empty($var) same time! Just use empty() ?! With error_reporting(E_ALL) you'll get a bunch of warnings if you only use empty() w/o the isset() ! use isse

Re: [PHP] isset($var) && !empty($var) same time!

2002-08-02 Thread lallous
Just use empty() ?! With error_reporting(E_ALL) you'll get a bunch of warnings if you only use empty() w/o the isset() ! use isset() first and then check wheter empty or not empty! so there is not one function that tests for empty and isset same time!? Elias "Analysis & Solutions" <[EMAIL PROT

Re: [PHP] isset($var) && !empty($var) same time!

2002-08-02 Thread Analysis & Solutions
Folks: On Fri, Aug 02, 2002 at 07:01:38PM +0200, Jürgen wrote: > > Why would i ever want to use isset() then? Because sometimes you just want to check if something is set due to null, '' and 0 being important. $var = ''; empty($var); // evaluates to true isset($var); // evaluates t

Re: [PHP] isset($var) && !empty($var) same time!

2002-08-02 Thread Jürgen
But if this is true what you say, that empty() checks for not set null an empty string zero Why would i ever want to use isset() then? If i understood you correctly, would the following op = isset($_GET['op']) && !empty($_GET['op']) ? $_GET['op'] : ''; be the same as op = !empty($_GE

Re: [PHP] isset($var) && !empty($var) same time!

2002-08-02 Thread Analysis & Solutions
On Fri, Aug 02, 2002 at 04:48:17PM +0200, lallous wrote: > > function issne($var) > { >return isset($var) && !empty($var) ? true : false; > } > > is there is any builtin function that does that? (one function call). Yes. Just use empty(). It automatically checks if the variable is: not

[PHP] isset($var) && !empty($var) same time!

2002-08-02 Thread lallous
I have wrote this function: function issne($var) { return isset($var) && !empty($var) ? true : false; } which can be called as: if (issne(&$mightbeundefinedvariable)) echo "using this variable"; is there is any builtin function that does that? (one function call). //Elias -- PHP Gene