Jump to content

PHP Loop Help!


01hanstu

Recommended Posts

I don't understand about the CSV, but here you get an array of Mondays from today until the end of the year:

 

$start = time(); //or whenever you want

for($date=$start; date('Y', $date)==date('Y', $start); $date=strtotime('next monday', $date)) {
$mondays[] = date('Y-m-d', $date);
}

Link to comment
https://forums.phpfreaks.com/topic/217445-php-loop-help/#findComment-1129100
Share on other sites

Hi,

The CSV holds the data, that gets exported from another system. I am importing it into the database, and within the DB it has a table called timetable, with a structure of the following

 

| Start_date | MON | TUE | WED | THU | FRI |

 

Then the script will open up week based on the start date, and then it can be used by the app.

The app is a custom calendar.

 

Sorry if I havn't explained it properly.

Link to comment
https://forums.phpfreaks.com/topic/217445-php-loop-help/#findComment-1129155
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.