array_multisort but with empty values last

Hello,

I have 4 arrays that I sort with:

array_multisort($arrays[“first”],$arrays[“second”],$arrays[“third”], $arrays[“'last”]);

The first array has empty elements and I want to put them at the end of the list. Multisort puts them at the beginning, is there a simple way to do that?

Thanks :wink:

Can you post some example data which demonstrates your point?

Before and after samples would be nice…

Sure!

http://codepad.org/V6TjCsS5

The first container array in the result is the one that has to be sorted.
The second one is the sorted one.
But, as you can see, in $arrays[0][0], there’s the empty value that I want last with the other values associated with it (“two” and “option2”);