Is there any way to get next 10 dates ( for example ) next Tuesdays and Thursdays it should look like this:
5.april / 7.april / 12.april / 14.april / 19.april / 21.april / 26.april ...
Simple date problem
Moderator: General Moderators
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: Simple date problem
This is a popular homework assignment:
Code: Select all
$date = time(); //start date
$i = 0;
while(($date = strtotime('next Tuesday', $date)) && $i<5) {
$result[] = date('j.F', $date);
$result[] = date('j.F', strtotime('next Thursday', $date));
$i++;
}
print_r($result);mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Re: Simple date problem
thx works great 