Level 74
First you need to know where the data comes from, if it comes from the database, you sort it there first,
Hi, I have problem with sort my large array.
dd($myarray[0]);
return me:
array:6 [▼ // app/Services/PresenceService.php:190
"week1" => array:7 [▼
0 => array:7 [▼
"isEditable" => false
"input" => "<input class="form-check-input" type="checkbox" name ="value-470" value = "1" >"
"checked" => 0
"isDirectorDay" => 0
"date" => "2024-04-01"
"lastAcceptedDay" => "2024-04-08"
"present" => 0
]
1 => array:7 [▼
"isEditable" => false
"input" => "<input class="form-check-input" type="checkbox" disabled checked>"
"checked" => 1
"isDirectorDay" => 1
"date" => "2024-04-02"
"lastAcceptedDay" => "2024-04-08"
"present" => 1
]
2 => array:7 [▼
"isEditable" => false
"input" => "<input class="form-check-input" type="checkbox" disabled checked>"
"checked" => 1
"isDirectorDay" => 1
"date" => "2024-04-03"
"lastAcceptedDay" => "2024-04-08"
"present" => 1
]
3 => array:7 [▼
"isEditable" => false
"input" => "<input class="form-check-input" type="checkbox" name ="value-473" value = "1" >"
"checked" => 0
"isDirectorDay" => 0
"date" => "2024-04-04"
"lastAcceptedDay" => "2024-04-08"
"present" => 0
]
4 => array:7 [▶]
5 => array:7 [▶]
6 => array:7 [▶]
]
"week2" => array:7 [▶]
"week3" => array:7 [▶]
"week4" => array:7 [▶]
"week5" => array:7 [▶]
"info" => array:4 [▼
"name" => "Adamowicz2 Paweł1"
"totalDays" => 35
"presentDays" => 5
"frequency" => 14.29
]
]
In my array I have about 100 records.
I need sort my array by info=>name.
How can I make it?
Please help me
Please or to participate in this conversation.