Question and answer is powered by AnsPress.io
I want to print days name Like Sunday, Monday, Tuesday, …… for a date value. How can I print days name from date in PHP. I need someone help.
use l in date with strtotime and pass in the date:
date(‘l’, strtotime($date))
Print day name from date in php
<?php
foreach( $mydate as $cdate ){
echo $cdate->format( “D” );
}
?>
Out put: Mon Tue Wed Thu Fri Sat Sun