This function returns a given string in upper case.
Syntax: strtoupper(string);
Example input:
$str1=" my PrOgRam";
echo $str1;
echo "
";
echo strtoupper($str1);
Example output:
my PrOgRam
MY PROGRAM
Showing posts with label string functions. Show all posts
Showing posts with label string functions. Show all posts
Tuesday, September 16, 2008
Saturday, September 13, 2008
The strrev() function
This function is used to reverse any given string.
Syntax: strrev(string);
Example inputs:
$str1= "A simple PHP program";
echo $str1."
";
$str2 = strrev($str1);
echo $str2."
";
echo $str1."
";
echo strrev($str1);
Syntax: strrev(string);
Example inputs:
$str1= "A simple PHP program";
echo $str1."
";
$str2 = strrev($str1);
echo $str2."
";
echo $str1."
";
echo strrev($str1);
Subscribe to:
Posts (Atom)