Re: If statement question...

From: Date: Mon, 11 Oct 2004 05:39:41 +0000
Subject: Re: If statement question...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-199146@lists.php.net to get a copy of this message
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 }

« previous php.general (#199146) next »