Convert a string to uppercase:
strtoupper() function is used to convert a string to uppercase. It convert all characters of string to uppercase.
Syntax:
strtoupper(string)
You have to pass only one parameter to the function i.e., the string which you want to convert to uppercase.
For example:
<?php
echo strtoupper("Convert this string to uppercase");
?>
Convert a string to lowercase:
strtolower() function is used to convert a string to lowercase. It convert all characters of string to lowercase.
Syntax:
strtolower(string)
You have to pass only one parameter to the function i.e., the string which you want to convert to lowercase.
For example:
<?php
echo strtolower("CONVERT THE STRING TO LOWERCASE");
?>
0 Comment(s)