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