|
|
convert string to lowercase or upper case in php - PHP
|
Views : 379
|
|
Tagged in : PHP
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
To convert all the characters in a string to lower case (lowercase):
strtolower($string) — This function makes a string lowercase
Example
$str = "LOWERCASE as lower case";
$str = strtolower($str);
echo $str; // Prints "lowercase as lower case"
?>
To convert all the characters in a string to upper case (uppercase):
strtoupper($string) — This function makes a string upper case
Example
$str = "uppercase as UPPER CASE";
$str = strtolower($str);
echo $str; // Prints "UPPERCASE AS UPPER CASE"
?>
more functions
# ucfirst() - Make a string's first character uppercase
# ucwords() - Uppercase the first character of each word in a string |
|
By rajesh, On - 2010-01-03 |
|
|
|