strlen() :To get the length of the string.example:
<?php
$t="hello";
echo strlen($t);
?>
5
<?php
echo str_word_count("Hello world!");
?>
strpos() : Search for specific text with in a string:
<?php
echo strpos("Hello world!", "r");
?>
Output:
<?php
echo str_replace("Morning" , "afternoon","Good Morning");
?>
Leave a Comment
1 Comments