xxxxxxxxxx
<?php
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtoupper($str);
echo $str; // Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
?>
xxxxxxxxxx
//string to all uppercase
$string = "String with Mixed use of Uppercase and Lowercase";
//php string to uppercase
$string = strtoupper($string);
// = "STRING WITH MIXED USE OF UPPERCASE AND LOWERCASE"
xxxxxxxxxx
$lowercase = "this is lower case";
$uppercase = strtoupper($lowercase);
echo $uppercase;
xxxxxxxxxx
<?php
function strtoupperWithAccents($string) {
$string = strtoupper($string);
$string = str_replace(
array('é', 'è', 'ê', 'ë', 'à', 'â', 'î', 'ï', 'ô', 'ù', 'û'),
array('É', 'È', 'Ê', 'Ë', 'À', 'Â', 'Î', 'Ï', 'Ô', 'Ù', 'Û'),
$string
);
return $string;
}
xxxxxxxxxx
$string = strtoupper($string);
echo strtoupper($product_type) == "RENT" ? __d('product', 'rent') : __d('product', 'sell');
xxxxxxxxxx
<?php
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtoupper($str);
echo $str; // show: MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
xxxxxxxxxx
<?php
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtoupper($str);
echo $str; // Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
?>
xxxxxxxxxx
$string = "hello world";
$uppercaseString = strtoupper($string);
echo $uppercaseString;