xxxxxxxxxx
$string = strtoupper($string);
echo strtoupper($product_type) == "RENT" ? __d('product', 'rent') : __d('product', 'sell');
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
<?php
$foo = 'bonjour tout le monde!';
$foo = ucfirst($foo); // Bonjour tout le monde!
$bar = 'BONJOUR TOUT LE MONDE!';
$bar = ucfirst($bar); // BONJOUR TOUT LE MONDE!
$bar = ucfirst(strtolower($bar)); // Bonjour tout le monde!
?>
xxxxxxxxxx
<?php
$str_first_cap = "hang on, this is first letter capital example!";
echo ucwords($str_first_cap);
?>
xxxxxxxxxx
<?php
function strtoupperWithAccents($string) {
$string = strtoupper($string);
$string = str_replace(
array('é', 'è', 'ê', 'ë', 'à', 'â', 'î', 'ï', 'ô', 'ù', 'û'),
array('É', 'È', 'Ê', 'Ë', 'À', 'Â', 'Î', 'Ï', 'Ô', 'Ù', 'Û'),
$string
);
return $string;
}
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
<?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;