I'm trying to run some code to say if the string "ims_image" is found do this.... else do that...
I'm trying this:
<?php
$current = $_SERVER['REQUEST_URI'];
$mystring = 'ims_image';
$pos = strpos($mystring, $current);
echo "Search For " . $mystring . " within " . $current . "..... " . $pos;
if ($pos !== false) { ?>
echo '<div class="sidebar1">';
get_sidebar('gallery-left');
echo '</div>';
} else { }
?>
Currently its failing - the echo output should say: Search For ims_image within /demo/ims_image/iwp-12-15-0011..... then either true or false but its blank.... just says Search For ims_image within /demo/ims_image/iwp-12-15-0011.....
Am I using the wrong method of searching the string?











