RE: [PHP] How to check if vaiable is defined or not?
| From: | PHPBeginner.com | Date: | Tue, 13 Feb 2001 14:34:08 +0000 |
| Subject: | RE: [PHP] How to check if vaiable is defined or not? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-39422@lists.php.net to get a copy of this message | ||
There's also possible to do a simple "try"
if($variable)
echo 'It contains something';
else
echo 'Has nothing inside, unless it's a 0';
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim@phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: Ankur Verma [mailto:averma@noida.hcltech.com]
Sent: Tuesday, February 13, 2001 3:29 PM
To: sed@sed.is; php-general@lists.php.net
Subject: Re: [PHP] How to check if vaiable is defined or not?
try using
isset() or empty()
see the php manual for more details
Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India
----- Original Message -----
From: "SED" <sed@sed.is>
To: <php-general@lists.php.net>
Sent: Tuesday, February 13, 2001 4:51 AM
Subject: [PHP] How to check if vaiable is defined or not?
> Hi,
>
> I'm sending a form, with check-boxes, via post to PHP-script and if the
> boxes are not checked they don't post value for its variable - Can I check
> with a function if the variable is defined? (or should I focus on another
> solution?)
>
> Regards,
> Sumarlidi Einar Dadason
>
> SED - Graphic Design
>
> ------------------------------------------
> Phone: (+354) 4615501
> Mobile: (+354) 8960376
> Fax: (+354) 4615503
> E-mail: sed@sed.is
> Homepage: www.sed.is <- New Homepage!
> ------------------------------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net