Re: Testing a String for 'most' Capitalised
| From: | Jochem Maas | Date: | Mon, 10 Oct 2005 14:57:34 +0000 |
| Subject: | Re: Testing a String for 'most' Capitalised | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-223821@lists.php.net to get a copy of this message | ||
Greg Donald wrote:
On 10/10/05, Jochem Maas <jochem@iamjochem.com> wrote:I AM NOT THE OP THANKS, I'm quite capable of solving such a problem without the help of people who don't bother to think beyond 'sample data' ... It's bloody obvious that the data in question (sample or not) will not be in an order that means the string with the most capital letters will be 'top of the list' after a sort(). *shrug* is rather blasee btw.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 arrayWorks for the sample data you first posted. *shrug*
-- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/