note 21943 deleted from function.str-replace by victor
| From: | victor@php.net | Date: | Sat, 09 Nov 2002 18:09:46 +0000 |
| Subject: | note 21943 deleted from function.str-replace by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-39228@lists.php.net to get a copy of this message | ||
Please, note:
<?
$string="135.728.189-57";
$string2=(str_replace(".","",$string)) &&
(str_replace("-","",$string));
if ( ($string2=="") || (!is_numeric($string2)) )
{
echo "<font color=\"red\">Not a number !</font>";
}
else
{
echo $string;
}
?>
Well, in this test, it returns the first option of the case if (Not a number) ! I just can`t get it
! If I write:
<?
echo $string2;
?>
It gotta return "1" !!!!!!!!!!!!!
Is this a bug ????