I would like to Sort an Array with its sub array value ("Name") but keeping its original array key.
default Array:
Array (
[251] => Array
(
[color] =>
[name] => 8
[nbr] => 1
[url_name] => taille-8
[meta_title] =>
)
[323] => Array
(
[color] =>
[name] => 7
[nbr] => 2
[url_name] => taille-7
[meta_title] =>
)
[127] => Array
(
[color] =>
[name] => 34
[nbr] => 2
[url_name] => taille-34
[meta_title] =>
)
);
By using array_multisort, I can able to get following Array:
Array(
[0] => Array
(
[color] =>
[name] => 7
[nbr] => 2
[url_name] => taille-7
[meta_title] =>
)
[1] => Array
(
[color] =>
[name] => 8
[nbr] => 1
[url_name] => taille-8
[meta_title] =>
)
[2] => Array
(
[color] =>
[name] => 34
[nbr] => 2
[url_name] => taille-34
[meta_title] =>
)
);
But what i need is,
Array(
[323] => Array
(
[color] =>
[name] => 7
[nbr] => 2
[url_name] => taille-7
[meta_title] =>
)
[251] => Array
(
[color] =>
[name] => 8
[nbr] => 1
[url_name] => taille-8
[meta_title] =>
)
[127] => Array
(
[color] =>
[name] => 34
[nbr] => 2
[url_name] => taille-34
[meta_title] =>
)
);
Thanks in adv :)