MD>> if ( (int)$PageOptions['Default'] == $PageOptions['Default'] ) {
Sorry, forgot to add that also bear in mind that the comparison
operator == will automatically cast your string to an integer for the
comparison. The following will take a user string ($str) and check if
it is an integer or not.
<?
$str = "5.0a";
$v = intval($str);
if ("$v" === "$str")
{
echo "Integer";
}
else
{
echo "Something else";
}
?>
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php