Skip to content

Tag: loops

Organizing array Iteration generated from nested loops PHP

I have a loop that fetches data from an excel file using phpspreadsheet. data fetching has no problem, but what I want to do is organize the data to a multi-dimensional array then convert it to JSON so I can access it through javascript. here’s the code: when I run this code, it shows this text: Now I w…

get time intervals with time range

I am trying to get time interval with custom start and end time variables for which i have searched and find its relevant information on this link. I have tried the following code but its giving errorUncaught Error: Call to a member function date() on string Answer You need to use the builtin DateTime class a…