I\'m just trying to figure that out...
$mystring = \"/abc/def/hij\";
$find = \"/abc\";
echo(strpos($mystring, $find) . \"
\");
if (strpos($mystrin
Test using the !==
operator. This will compare types and values, as opposed to just values:
$mystring = "/abc/def/hij";
$find = "/abc";
echo(strpos($mystring, $find) . "<br>");
if (strpos($mystring, $find) !== false) {
echo("found");
} else {
echo("not found");
}
I found what the problem was... I need to use !== false instead of != ... Aaaah, php.