Posiadam poniższa tablice, potzebvuje ją posortowac wg pola.. [sell-form-pos] w przypadku gdy pole to ma wartość 0 sortujemy wg alfabetu..
Czyli najpierw trzeba posortować wg pola [sell-form-title] a póxniej jeszcze wg pola [sell-form-pos]
( ( [0] => stdClass Object ( [sell-form-id] => 4537 [sell-form-title] => Chipset [sell-form-cat] => 63018 [sell-form-type] => 4 [sell-form-res-type] => 2 [sell-form-def-value] => 0 [sell-form-opt] => 8 [sell-form-length] => 3 [sell-min-value] => 0.00 [sell-max-value] => 140.00 [sell-form-desc] => -- Wybierz -- |AMD 740G|AMD 760G|AMD 770|AMD 785G|AMD 790X|AMD 790FX|AMD 790GX|AMD 870|AMD 880G|AMD 890FX|AMD 890GX|nVidia 6150SE/nForce430|nVidia 7025/nForce630a|nVidia nForce 520LE|Inny [sell-form-opts-values] => 0|10|20|30|40|50|60|70|80|90|100|110|115|120|130|140 [sell-form-field-desc] => Komputery: Płyty główne: Socket AM3 [sell-form-param-id] => 9003 [sell-form-param-values] => 0|10|20|30|40|50|60|70|80|90|100|110|115|120|130|140 [sell-form-parent-id] => 0 [sell-form-parent-value] => 0 [sell-form-unit] => [sell-form-options] => 0 ) [1] => stdClass Object ( [sell-form-id] => 4538 [sell-form-title] => Standard płyty [sell-form-cat] => 4228 [sell-form-type] => 4 [sell-form-res-type] => 2 [sell-form-def-value] => 0 [sell-form-opt] => 8 [sell-form-length] => 2 [sell-min-value] => 0.00 [sell-max-value] => 60.00 [sell-form-desc] => -- Wybierz -- |ATX|Micro ATX|Mini ITX|SSI|uATX|Inny [sell-form-opts-values] => 0|10|20|30|40|50|60 [sell-form-field-desc] => Komputery: Płyty główne [sell-form-param-id] => 9004 [sell-form-param-values] => 0|10|20|30|40|50|60 [sell-form-parent-id] => 0 [sell-form-parent-value] => 0 [sell-form-unit] => [sell-form-options] => 0 ) [2] => stdClass Object ( [sell-form-id] => 4539 [sell-form-title] => Maksymalna ilość pamięci [GB] [sell-form-cat] => 4228 [sell-form-type] => 3 [sell-form-res-type] => 3 [sell-form-def-value] => 0 [sell-form-opt] => 8 [sell-form-length] => 0 [sell-min-value] => 0.00 [sell-max-value] => 200.00 [sell-form-desc] => [sell-form-opts-values] => [sell-form-field-desc] => Komputery: Płyty główne [sell-form-param-id] => 9020 [sell-form-param-values] => [sell-form-parent-id] => 0 [sell-form-parent-value] => 0 [sell-form-unit] => [sell-form-options] => 0 ) [3] => stdClass Object ( [sell-form-id] => 4540 [sell-form-title] => Rodzaj pamięci [sell-form-cat] => 4228 [sell-form-type] => 6 [sell-form-res-type] => 2 [sell-form-def-value] => 0 [sell-form-opt] => 8 [sell-form-length] => 1 [sell-min-value] => 0.00 [sell-max-value] => 7.00 [sell-form-desc] => DDR|DDR2|DDR3 [sell-form-opts-values] => 1|2|4 [sell-form-field-desc] => Komputery: Płyty główne [sell-form-param-id] => 9021 [sell-form-param-values] => 16|64|512 [sell-form-parent-id] => 0 [sell-form-parent-value] => 0 [sell-form-unit] => [sell-form-options] => 0 ) [4] => stdClass Object ( [sell-form-id] => 4541 [sell-form-title] => Typ pamięci [sell-form-cat] => 4228 [sell-form-type] => 6 [sell-form-res-type] => 2 [sell-form-def-value] => 0 [sell-form-opt] => 8 [sell-form-length] => 5 [sell-min-value] => 0.00 [sell-max-value] => 16383.00 [sell-form-desc] => DDR2 533|DDR2 667|DDR2 800|DDR2 1066|DDR2 1200|DDR3 1066|DDR3 1333|DDR3 1600|DDR3 1800|DDR3 2000|DDR3 2133|DDR3 2200|DDR3 2600+|Inny [sell-form-opts-values] => 1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192 [sell-form-field-desc] => Komputery: Płyty główne [sell-form-param-id] => 9022 [sell-form-param-values] => 4|8|32|256|1024|2048|8192|32768|131072|262144|524288|1048576|2097152|4194304 [sell-form-parent-id] => 0 [sell-form-parent-value] => 0 [sell-form-unit] => [sell-form-options] => 0 ) [5] => stdClass Object ( [sell-form-id] => 4542 [sell-form-title] => Złącza [sell-form-cat] => 4228 [sell-form-type] => 6 [sell-form-res-type] => 2 [sell-form-def-value] => 0 [sell-form-opt] => 8 [sell-form-length] => 2 [sell-min-value] => 0.00 [sell-max-value] => 31.00 [sell-form-desc] => DVI|FireWire|HDMI|SPDIF|USB 3.0 [sell-form-opts-values] => 1|2|4|8|16 [sell-form-field-desc] => Komputery: Płyty główne [sell-form-param-id] => 9040 [sell-form-param-values] => 4|128|256|512|8192 [sell-form-parent-id] => 0 [sell-form-parent-value] => 0 [sell-form-unit] => [sell-form-options] => 0 ) [6] => stdClass Object ( [sell-form-id] => 20022 [sell-form-title] => Stan [sell-form-cat] => 4228 [sell-form-type] => 4 [sell-form-res-type] => 2 [sell-form-def-value] => 0 [sell-form-opt] => 1 [sell-form-length] => 1 [sell-min-value] => 0.00 [sell-max-value] => 2.00 [sell-form-desc] => -- Wybierz -- |Nowy|Używany [sell-form-opts-values] => 0|1|2 [sell-form-field-desc] => globalny \"Stan\" [sell-form-param-id] => 11323 [sell-form-param-values] => 0|1|2 [sell-form-parent-id] => 0 [sell-form-parent-value] => 0 [sell-form-unit] => [sell-form-options] => 0 ) ) [ver-key] => 29596301 [ver-str] => 1.0.38 )
W jaki sposób mozna takie sortowanie osiągnąc? Znalazłem listę funkcji do sortowania tablic, ale nie wiem, którą funkcją można posortowac tą tabluice http://in.php.net/manual/en/array.sorting.php