Issue
how can i echo DAY of the date only?
$date = Saturday, 3 September 2022;
if ($date == '3') {
echo '03';
}
Solution
Assuming $date is or has been converted to a string
$date = 'Saturday, 3 September 2022';
$explodedDate = explode(' ', $date);
if ($explodedDate[1] == '3') {
echo '03';
}
Answered By - jasond1284 Answer Checked By - Marilyn (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.