I have a PHP array of DateTime objects like this:
Array ( [0] => 2019-04-16 [1] => 2019-04-17 [2] => 2019-04-18 [3] => 2019-04-19 )
I hold this array in a PHP variable $oldArraytep
. At runtime i build a calendar and i want to highlight specific dates that are in the $oldArraytep
array.
To do this i was planning on:
- converting the php array to javascript array
- at run time check if there is a specific
myJavascriptArray.includes(date("Y-m-d", (timeinmilli/1000)));
Where i am completely lost is on how to convert a php array of DateTime into an javascript array of date