Return String found at position 22 : strrpos « String « PHP
- PHP
- String
- strrpos
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";
?>
Related examples in the same category