Question and answer is powered by AnsPress.io
How can I print the number format of the week? If today is Monday then it prints 1 or Tuesday then print 2. Print 7 days 1,2,3,4,5,6,7. How is possible to print the current day number of the week in PHP.
Apply it:
<?php $datetime = date('Y-m-d'); $weekday = date('w', strtotime($datetime)); echo $weekday; ?>