1 / 3
amogtech
2 / 3
mhk
3 / 3
ccg


<?php

$string = 'I am Thet Naing Win. This is PHP Testing and Word position Test. If you are insterested in PHP, please join us!';

$find = 'T';

$find_length = strlen($find);

$offset = 1;

while ($strpos = strpos($string, $find, $offset)){

echo 'The Character <strong>'.$find. '</strong> is found at '.$strpos.'.</br>';

$offset = $strpos + $find_length;

}

?>


Share On:

What do you think?

Send us feedback!