Mega Code Archive

 
Categories / Php / Strings
 

Return String found at position 22

<?php     $haystack = 'this is a test. this is a test. this is a test';      $pos = strpos ($haystack, 'bottle');     if ($pos === false)       echo "String not found\n";     else       echo "String found at position $pos\n"; ?>