Sort an array by value type. Where do I start :)??

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I couldn't find an function from the docs which sufficed...  or at
least I couldn't put the match together.

I'm looking for a way to sort and array by value type

array(array(), array(), "value", "value", array(), "value", "value",

sort of like a directory tree.. it's a giant array of configuration
data and the values for each array are mixed in with child arrays.
The outcome I would like to see is:

array("value", "value", "value", "value", array(), array(), array());

after the sort with the values before the sub arrays, I don't need the
actual values sorted... just their types sorted.... I'm thinking I
have to write my own comparison callback and use usort??? Fill me in
and thanks for your time.

Re: Sort an array by value type. Where do I start :)??

On Thu, 28 Jul 2011 21:07:01 -0700, Andrew Senner wrote:

Quoted text here. Click to load it

I think you probably nailed it with that last sentence.


Denis McMahon

Site Timeline