Quality Assurance Engineer
Synacor
(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 to do
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 !=
$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 $var0] as
the
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]
Subject: [PHP] Argh! nulls un stuff..
ok going mad all I need to do is check a variable
Software Quality Assurance Engineer
Synacor
(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 to do is check
Software Quality Assurance Engineer
Synacor
(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 to do
6 matches
Mail list logo