Capitolize a string.
Moderator: General Moderators
Capitolize a string.
How do I capitolize a string?
Code: Select all
$String = strtoupper($String);Hello,
With strtoupper($str), somthing like:
Zythan
With strtoupper($str), somthing like:
Code: Select all
<?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
?>- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
to get the very first character upper case simply use ucfirst()