★ wanayoo — archive 1999 http://www.php.net/manual/function.strtoupper.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Strings
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
Strings
* AddCSlashes
* AddSlashes
* bin2hex
* Chop
* Chr
* chunk_split
* convert_cyr_string
* count_chars
* crc32
* crypt
* echo
* explode
* flush
* get_html_translation_table
* get_meta_tags
* hebrev
* hebrevc
* htmlentities
* htmlspecialchars
* implode
* join
* levenshtein
* ltrim
* md5
* Metaphone
* nl2br
* ob_start
* ob_get_contents
* ob_end_flush
* ob_end_clean
* ob_implicit_flush
* Ord
* parse_str
* print
* printf
* quoted_printable_decode
* quotemeta
* rtrim
* sscanf
* setlocale
* similar_text
* soundex
* sprintf
* strcasecmp
* strchr
* strcmp
* strcspn
* strip_tags
* stripcslashes
* stripslashes
* stristr
* strlen
* str_pad
* strpos
* strrchr
* str_repeat
* strrev
* strrpos
* strspn
* strstr
* strtok
* strtolower
* strtoupper
* str_replace
* strtr
* substr
* substr_count
* substr_replace
* trim
* ucfirst
* ucwords
Manual: strtoupper
View the source code for this pageSearch the site



Previous page
 strtolower
 Updated
Sat, 12 Aug 2000
str_replace 
Next page


strtoupper

(PHP3 , PHP4 )

strtoupper -- Make a string uppercase

Description

string strtoupper (string string)

Returns string with all alphabetic characters converted to uppercase.

Note that 'alphabetic' is determined by the current locale. For instance, in the default "C" locale characters such as umlaut-a (ä) will not be converted.

Example 1. Strtoupper() example


$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
     

See also strtolower() and ucfirst().


User Contributed Notes: strtoupper


steve@dom.de
28-Oct-1999 12:04
If you are unable to change your default config to support special chars such as umlauts, then use strtr to translate upper/lower versions.

<pre>$string=strtr("ÄÖÜ","äöü");</pre>



ank@daltec.com.ar
27-Dec-1999 12:30

A good example of this strtr use for spanish is:

$string = strtr($string,"&aacute;&eacute;&iacute;&oacute;&uacute;&ntilde;&uuml;","&Aacute;&Eacute;&Iacute;&Oacute;&Uacute;&Ntilde;&Uuml;");

You can swap them to translate from uppercase to lowercase or the other way around.



 About Notes


Previous page
 strtolower
 Updated
Sat, 12 Aug 2000
str_replace 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.