How do I change case? Say all UPPER CASE or all lower?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ridshack
Forum Commoner
Posts: 29
Joined: Wed Oct 11, 2006 10:34 pm

How do I change case? Say all UPPER CASE or all lower?

Post by ridshack »

Can anyone give me a hint on how to change the case of a value?

Code: Select all

<?php

$uppercase = “i need to be uppercase as a user entered me wrong.”;

echo “$uppercase”;
?>
Thank you,
Rid
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

Have you read the manual?

Code: Select all

strtoupper()
User avatar
andym01480
Forum Contributor
Posts: 390
Joined: Wed Apr 19, 2006 5:01 pm

Post by andym01480 »

strtoupper http://uk2.php.net/manual/en/function.strtoupper.php

or strtolower! http://uk2.php.net/manual/en/function.strtolower.php

EDITED: Doh - the old post at the same time thing!
ridshack
Forum Commoner
Posts: 29
Joined: Wed Oct 11, 2006 10:34 pm

Post by ridshack »

Thanks guys,

Googleing left me with case studys and select statements.

Ridshack
Post Reply