get day from date php – How to Get Full Day Name from Date in PHP?

get day from date php and display it. The PHP date function is used to format a date. here we can learn to main 3 Examples.

get day from date php

Get Full Day Name to $Date can be done in many ways. The following source code will get day from date php.

Example 1: PHP Get Day Name from Date

php_get_day_name_from_date.php

<?php
  
    $myJoinDt = "2022-02-02";
    $latestDt = date('l', strtotime($myJoinDt));
  
    echo $latestDt;
  
?>

Result

Tuesday

don’t miss : Get Previous Month In Php

Also Read This πŸ‘‰   PHP Change Password script using Mysqli

Example 2: PHP Get Day Name from Current Date

php_get_day_name_from_current_date.php

<?php
  
    $latestDt = date('l');
  
    echo $latestDt;
  
?>

Result

Monday

Example 3: PHP Get Day Name from Number

php_get_day_name_from_number.php

<?php
  
    $numericDay = "1";
    $latestDt = date('l', strtotime("Sunday +{$numericDay} days"));
  
    echo $latestDt;
  
?>

Result

Monday

I hope you get an idea about get day from date php.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.