Friday, October 2, 2009

RE: Still sort array help

Got it!

Thanks.

Dave

-----Original Message-----
From: brian [mailto:bally.zijn@gmail.com]
Sent: October-02-09 10:27 PM
To: cake-php@googlegroups.com
Subject: Re: Still sort array help


natcasesort() returns a boolean, not an array.

debug(natcasesort($merged));

On Fri, Oct 2, 2009 at 6:07 PM, Dave Maharaj :: WidePixels.com
<dave@widepixels.com> wrote:
>
> No matter what i try I still cant sort an array.
>
> $merged = array_merge ($new_skills, $selected);
>    debug($merged);
> Array
> (
>    [0] => Tree
>    [1] => Zoo
>    [2] => Hello
>    [3] => Test
>    [4] => Cool
>    [5] => 3 Doors Down
>    [6] => Yellow
> )
>
>
>
>
>    $sorted = natcasesort($merged);
>    debug($sorted);
>
> Array
> (
>  1
> )
>
>
> I simply want to sort the merged array alphbeticaly but everything
> just returns 1
>
> Tried sort();
> array_multisort()
> natsort();
>
> Ideas?
>
> Dave
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: