SPAM: [thelist] PHP is_nan
Mark Joslyn
Mark.Joslyn at SolimarSystems.com
Wed Jul 2 15:32:44 CDT 2003
>From my understanding, the is_nan is only a test to determine whether the
value is a number - so only numbers will validate through this check. If you
want to check to see if the string is alphanumeric, you would use
is_numeric.
$test = "string";
if (is_numeric($test)) {
echo "this is a number";
} else {
echo "this is not a number"
}
I vould be off base though!
mj
-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of fstorr
Sent: Wednesday, July 02, 2003 11:44 AM
To: thelist at lists.evolt.org
Subject: SPAM: [thelist] PHP is_nan
Hi all
This is probably a real newbie error, but PHP's is_nan function is not
playing for me. I've got this as a test:
<?
$tester = "hello";
if (is_nan($tester))
{
echo "this works";
exit;
}
else
{
echo "don't work";
exit;
}
?>
And I get back:
Warning: is_nan() expects parameter 1 to be double, string given in
(address of the page)
Why?!
Regards
Francis
--
* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/
Evolt.org conference in London, July 25-27 2003. Register today at
http://evolt.org.uk
For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
More information about the thelist
mailing list