Find the position of a character in a string

We can find out the position using the function strpos() that will return the position of a character

Example

<?php
$string=”phpcodez.com”;
echo strpos($string,”.”) // 8
?>

Share

Leave a Reply

Your email address will not be published. Required fields are marked *