Fork me on GitHub

builtin multideminsional array sort?  Bottom

  • Does Zikula have a built in multidimensional array sort function?
  • That is also available in PHP, no reason for Zikula to supply it icon_wink
    http://www.php.net/m…array-multisort.php
    http://www.php.net/m…n/array.sorting.php

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • I guess I need more than that; judging by the number of comments suggesting alternatives there it looks like others need more too ;)

    Suppose I have an array of arrays; say, 30 "rows" of 10 "columns" each. I want a function in which I can pass the array and a primary, secondary, tertiary, etc sort column and have it return the results. There are such functions out there, I just thought it would be nice if there were an "approved" standard one for Zikula.

    If the ones you mention can do that, can you show me an example?
  • BTW, usually for every PHP function there are loads of suggestions and enhancements icon_wink
    But I see what you mean, I don't think there is anything like that in Zikula. So I can only suggest to pick one of the functions in the PHP array_multisort comments. Maybe some of the Core devs have a suggestion?

    --
    campertoday.nl, Module development, Dutch Zikula Community

This list is based on users active over the last 60 minutes.