Quote:
Originally Posted by blackmonsters
Yeah and when you do a false test with a number, say "-1" then the if statement evals to true when false is returned from stripos.
<?
$string = "ello";
if (stripos($string,'hello') != -1 ) {
echo "True";
}
else {
echo "false";
}
?>
Like I said, the correct way to do it is !== false
|
There is no reason for a string position to be negative.