I have made a small application using jQuery\'s datepicker. I am setting unavailable dates to it from a JSON file which looks like this:
datepicker
{ \"dat
You are ignoring the return value of array_values in your existing attempt to reindex the array. Correct is
array_values
$arr['dates'] = array_values($arr['dates']);
The reindexing should also be moved outside the foreach loop, there is no point in reindexing multiple times.
foreach