ot;temp"])
> >
> > HTH
> >
> > Sam Masiello
> > Software Quality Assurance Engineer
> > Synacor
> > (716) 853-1362 x289
> > [EMAIL PROTECTED]
> >
> >
> >
> > -Original Message-
> > From: Francis [mailto:[E
acor
> (716) 853-1362 x289
> [EMAIL PROTECTED]
>
>
>
> -Original Message-
> From: Francis [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 9:23 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Argh! nulls un stuff..
>
>
> ok going mad all I need t
t;] > 0 && $_SESSION["temp"] != "" &&
is_numeric($_SESSION["temp"])
HTH
Sam Masiello
Software Quality Assurance Engineer
Synacor
(716) 853-1362 x289
[EMAIL PROTECTED]
-Original Message-
From: Francis [mailto:[EMAIL PROTECTED]]
Sent: M
tions are true then it'll execute the "..." block.
Please note that this code has not been tested and is prone to typos.
:)
Matt
> -Original Message-
> From: Francis [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 9:23 AM
> To: [EMAIL PROTECTED]
> Subj
$var = 0;
if(!is_int($var)) {
echo '$var isn\'t numeric';
}
and simple 'not' is going to ignore '0'. To check wherther a value is an
integer use is_int() or is_numeric(), which are the same things anyway.
If you care that the value is also higher than '0' add [ and $var>0] as
the secon
ok going mad all I need to do is check a variable and if it has a number in
it then do something, so anything from 0 up, but it keeps thinking 0 is null
and failing, anyway around this? or am I just being stupid as usual?
$_SESSION["temp"] = 0;
$tempVar = 0;
if($_SESSION["temp"] !=""){ echo "!=
6 matches
Mail list logo