Please login to start chat

ICT Solutions 2019-01-19 12:59:44
Category : php tutorials

String position in php

<?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;
}
?>

Comments:

No comment to show.

Available Services
Download Android Application