here I need to remove the same week id object array from my main array in PHP
[{"week_id":""},
{"week_id":"23","location_schedule":"Tuesday","location_date_from":"10\/18\/2022 4:30 PM"},
{"week_id":"23","location_schedule":"Tuesday","location_date_from":"10\/18\/2022 4:30 PM"},
{"week_id":"24","location_schedule":"Tuesday","location_date_from":"10\/25\/2022 3:30 PM"},
{"week_id":"24","location_schedule":"Tuesday","location_date_from":"10\/25\/2022 3:30 PM"}]
$weeksArray = array(array("week_id"=>""));
$i=0;
foreach($orderweek as $weeks)
{
$weeksArray[]=[
'week_id'=>$weeks['week_id'],
'location_schedule'=>$weeks['location_schedule'],
'location_date_from'=>$weeks['location_date_from']
];
echo "<br>";
// }
$i++;
}
// $weeksArray = array(array("week_id"=>"25"));
echo json_encode($weeksArray);