Re: Testing a String for 'most' Capitalised

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg Donald wrote:
On 10/10/05, zzapper <david@xxxxxxxxxx> wrote:

Image that there could be a string

fred
Fred
FRED

First of all I need to know that these are same which I can do with strtolower,
but how could I tell



$a = array( 'fred', 'Fred', 'FRED' );
sort( $a );
echo $a[ 0 ];


cute - but it doesn't always work e.g.:

$a = array( "FrEDDie", "fREDdIE", "FReddie" );
sort( $a );
echo $a[ 0 ]; // we want the 2nd item from the unsort array


--
Greg Donald
Zend Certified Engineer
MySQL Core Certification
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux