> Strpos() function in php ~ Online tutorial

Strpos() function in php

strpos() function
The strpos() function is used to search for character within a string.
If a match is found, this function will return the position of the first match.
If no match is found, it will return FALSE.
Let's see if we can find the string "world" in our string:

< ?php
echo strpos("Hello world!","world");
? >

The output of the code above will be:

6

The position of the string "world" in our string is position 6. The reason that it is 6 (and not 7), is that

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: