Previous 20 days of the date calendar PHP Tutorials PHP Beginner Practice Display Previous Dates Working with previous dates For new code, DateTimeImmutable makes date arithmetic easier to read than repeatedly building timestamps with mktime().
27-Nov-2026:Fri
26-Nov-2026:Thu
25-Nov-2026:Wed
24-Nov-2026:Tue
23-Nov-2026:Mon
22-Nov-2026:Sun
21-Nov-2026:Sat
20-Nov-2026:Fri
19-Nov-2026:Thu
18-Nov-2026:Wed
17-Nov-2026:Tue
16-Nov-2026:Mon
15-Nov-2026:Sun
14-Nov-2026:Sat
13-Nov-2026:Fri
12-Nov-2026:Thu
11-Nov-2026:Wed
10-Nov-2026:Tue
09-Nov-2026:Mon
08-Nov-2026:Sun
07-Nov-2026:Sat
\11 = date (\" m \" );
27 = date( \" d \" );
2026 = date( \" Y \" );
for( $ i=0; $ i<=20; $ i++) {
echo date('d-M-Y:D',mktime(0,0,0, $ m,( $ de- $ i), $ y));
echo \" <br> \" ;
}
← All Basic Codes
Author & Instructor at
plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery,
and web development at plus2net. The tutorials focus on clear explanations, working
examples, and code that readers can test and adapt while learning.
← Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
https://www.plus2net.com
plus2net.com