Greg Donald wrote:
On 10/10/05, Jochem Maas <[EMAIL PROTECTED]> 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' ...
Yeah, everyone should read minds automatically, I agree.
I guess reading
On 10/10/05, Jochem Maas <[EMAIL PROTECTED]> 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' ...
Yeah, everyone should read minds automatically, I agree.
> It's bloody obvious that
> the dat
Greg Donald wrote:
On 10/10/05, Jochem Maas <[EMAIL PROTECTED]> wrote:
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
Works for the sample data you first posted. *shrug*
I AM N
On 10/10/05, zzapper <[EMAIL PROTECTED]> wrote:
> Hi,
>
> 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
> that 'FRED' is 'most captilised?
strlen(preg_replace('/[^[:upper:]]/',
On 10/10/05, Jochem Maas <[EMAIL PROTECTED]> wrote:
> 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
Works for the sample data you first posted. *shrug*
--
Greg Donald
Zend Ce
Greg Donald wrote:
On 10/10/05, zzapper <[EMAIL PROTECTED]> 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
> > Image that there could be a string
> > fred
> > Fred
> > FRED
It isn't hard to do.
> > First of all I need to know that these are same which I can do with
> > strtolower
Also note strcasecmp for this task -
http://uk2.php.net/manual/en/function.strcasecmp.php
--
PHP General Mailing List (h
On 10/10/05, zzapper <[EMAIL PROTECTED]> 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 ];
--
Greg Donal
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
that 'FRED' is 'most captilised?
Iterate through the string and count the number of capitalised letters.
You can do something like this (untest
Hi,
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
that 'FRED' is 'most captilised?
--
zzapper
Success for Techies and Vim,Zsh tips
http://SuccessTheory.com/
--
PHP General Mailing List (h
10 matches
Mail list logo