Saturday, 3 January 2015

strpos() function

The strpos() function is used to search for a character or a specific text within a string.

If a match is found, it will return the character position of the first match. 

If no match is found, it will return nothing.


The following example how to use a strpos():




 The result is come:

24




If the word is not present in the string, then no output will be displayed:



<?php
echo 'hello world';
?>
This entry was posted in :

0 comments:

Post a Comment