Re: If statement question...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



M. Sokolewicz wrote:

Gh wrote:

I would like to know how I can code the the following conditional
check.... if the $_GET['api'] does not exist, or is either set and has
no length or is set and is not an integer.


I am drawing a blank on the if statement to use....
I meant to say the following (notice the added brace ;))

 if(!isset($_GET['api']) || strlen($_GET['api']) == 0 ||
 !is_numeric($_GET['api'])) {
 // do something
 }

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux