How to use String function in PHP and what are the string function.
<?php
$first =”Common PHP String Function”;
$second=”How to use String Function in PHP”;
$third = $first;
$third.= $second;
?>
PHP String Function : Lower Case
Convert string to lower case.
<?php
echo strtolower($third);
?>
PHP String Function : Upper Case
Convert String to upper case.
<?php
echo strtoupper($third);
?>
PHP String Function : Upper Case First Letter
Upper case first letter of the string.
<?php
echo ucfirst($third);
?>
PHP String Function : UpperCase Word
Upper case First Letter of every word.
<?php
echo ucwords($third);
?>
PHP String Function : String length
Calculate the Length of the String.
<?php
echo strlen($third);
?>
PHP String Function : Trim
Trim the white Space from the beginning and last of the string.
<?php
echo trim($third);
?>
PHP String Function : Find
To find a string in a string.
<?php
echo strstr($third, “Function”);
?>
PHP String Function : Replace
To Replace the String by the Other String from a String.
<?php
echo str_replace(“Function”, “String Function”, $third);
?>
These are Some of the most commonly used String Function.



