Reputation: 284
Like if today is Thursday, then I want to display Friday using php date() function.
For example, the below code will show the current month but the next day of the month. It worked. <?php echo date("M "), date("d")+1 ?>
So I was trying through this one <?php echo date("l")+1, date("d")+1 ?>
and it fooled me :(.
Upvotes: 4
Views: 858
Reputation: 4171
The following expression gives you the next day:
date('l', time()+3600*24)
Upvotes: 0
Reputation: 33348
Have a look at strtotime
. Also, an l
will produce a full textual representation of the day of the week (e.g. Friday) when using date
.
Something like the following should do what you want:
date('l', strtotime('+1 day'))
Upvotes: 10