A fast way to search a string for another string is to use strpos() :
<?php
$needle = '\admin\';
$haystack = '\admin\index.php';
$pos = strpos($haystack, $needle);
echo $pos;
if (isset($pos)) {
echo 'Found';
} else {
echo 'Not found';
}
?>
Returns a '0' (the first char!) and 'Found'
If it's not found, false (or nothing) is returned
Hint : Have a look at http://www.php.net/manual/en/function.strpos.php