³¬Ô½PHP PHP¶¯Ì¬ | ¾­µäÎÄÕ | CLASS | Ïà¹ØÏÂÔØ | ³£¼ûÎÊÌâ | FORUM | WIKI | ÔÚÏßÊÖ²á
Site search:    
<strtolowerstrtr>
Last updated: Fri, 22 Jun 2007

strtoupper

(PHP 3, PHP 4 , PHP 5)

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.

Àý×Ó 1. strtoupper() example

<?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
?>

×¢: ¸Ãº¯ÊýÊÊÓÃÓÚ¶þ½øÖƶÔÏó£¡

See also strtolower(), ucfirst(), ucwords() and mb_strtoupper().




add a note add a note User Contributed Notes
strtoupper
steve at dom dot de
29-Oct-1999 03: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>

<strtolowerstrtr>
 Last updated: Fri, 22 Jun 2007
view source | feedback | send page | sitemap | aboutus   
Copyright ® 2002-2003 PHPE.NET. All rights reserved
Last updated:2002-11-22