View Single Post
Old 06-01-2014, 02:48 PM  
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,620
Quote:
Originally Posted by pornmasta View Post
it CAN... yes it can
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
blackmonsters is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote