Page 1 of 1
Change to lower case
Posted: Fri Feb 06, 2004 10:10 am
by cto1mac
Ok in ASP/VBScript I can do:
LCase(variable) and it will turn the variable into lowercase.
How do I do this in PHP??
Thanks
Posted: Fri Feb 06, 2004 10:14 am
by JayBird
like this
Code: Select all
<?php
$str = "MY UPPERCASE VARIABLE";
$str = strtolower($str);
echo $str; // Prints my uppercase variable
?>
Mark
Posted: Fri Feb 06, 2004 10:15 am
by malcolmboston
hope this helps
Code: Select all
<?php
$smallcase = "This will All Go LOWERCASE";
$str = strtolower($smallcase);
echo $str;
?>
edit : damn he beat me again!!!
Posted: Fri Feb 06, 2004 10:18 am
by JayBird
Always one step ahead buddy
Mark
Posted: Fri Feb 06, 2004 10:23 am
by malcolmboston
Code: Select all
<?php
if ($bech100 > $malcolmboston) {
echo "Cant Beat Him, So Be More Concise";
} else {
echo "No Longer A Noob";
}
?>
adding onto your question.........
to change all to uppercase
Code: Select all
<?php
$uppercase = "This will All Go UPPERCASE";
$str = strtoupper($uppercase);
echo $str;
?>
Hope that helps for the future
Posted: Fri Feb 06, 2004 10:31 am
by JayBird
hahaha, trying to be a step ahead og me now
Mark