⟩ How can we know the number of days between two given dates using PHP?
Simple arithmetic:
$date1 = date('Y-m-d');
$date2 = '2006-07-01';
$days = (strtotime() - strtotime()) / (60 * 60 * 24);
echo "Number of days since '2006-07-01': $days";
Simple arithmetic:
$date1 = date('Y-m-d');
$date2 = '2006-07-01';
$days = (strtotime() - strtotime()) / (60 * 60 * 24);
echo "Number of days since '2006-07-01': $days";
How you can include variables in Double-Quoted Strings in PHP?
How many ways to include the variables in Double-Quoted Strings in PHP?
Tell me how many escape sequences are recognized in Double-Quoted Strings in PHP?
Which special characters need to escape in Double-Quoted Stings?
How To concatenate the two strings together in PHP?
How you can assign a new character in a String using PHP?
How To get access a specific character in a String using PHP?
How to convert the numbers to strings in PHP?
Which special characters need to escape in Single-Quoted Stings?
How to specify the "new line" character in Single-Quoted Strings?