Page 1 of 1

change the case in a string?

Posted: Thu Sep 05, 2002 9:21 pm
by Sevengraff
Ok, i have a variable, $sec, and its contents are all in lowercase. how can i change them to uppercase? is that possible in php?

Posted: Thu Sep 05, 2002 9:57 pm
by hob_goblin

Posted: Thu Sep 05, 2002 10:52 pm
by phice
Example given on site:

Code: Select all

<?php
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtoupper($str);
print $str; # Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
?>

Posted: Thu Sep 05, 2002 11:23 pm
by Sevengraff
thanks!