I have a multidimensional array that looks like this:
array:3 [
0 => array:2 [
"titre" => "Un package test"
"nbDDL" => "3"
]
1 => array:2 [
"titre" => "retest"
"nbDDL" => "1"
]
2 => array:2 [
"titre" => "ytjrtj"
"nbDDL" => "1"
]
]
I would like to sort it by ASC or DESC order (depending on a variable passed in function parameter) with the nbDDL.
I looked at the method array_multisort() but I can not put it in place.
I work under Symfony 3. Currently, I have:
if($ordreTri == "ASC")
{
$liste = array_multisort("nbDDL", ASC);
}
Thanks for your help !
