Menu
Hi!
This script searches for the varaibles $search_string in a string. The problem is that if the search string contains text that is present in the first charater of the string then it still returns a negative result as the position is ‘0’
[code=php]
<?php
$my_string=”This is a string”;
$search=”This”;
if(strpos($my_string,$search))
echo “Found string”;
else
echo “Aww no string present”;
?>
how would i get around this.
Thank-you.