PHP strlen() function
The strlen() function returns the length of a string, in characters.
The example below returns the length of the string "Hello world!":
Code:<?php echo strlen("Hello world!"); ?>
PHP strpos() function
The strpos() function is used to search for a specified character or 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 FALSE.
The example below searches for the text "world" in the string "Hello world!":
Code:<?php echo strpos("Hello world!","world"); ?>


Reply With Quote

Bookmarks