×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Dylan Lopez
Added: Nov 23, 2017 10:04 AM
Views: 6
Tags: no tags
The example below outputs the number of days until 4th of July:
  1. $d1=strtotime("July 04");
  2. $d2=ceil(($d1-time())/60/60/24);
  3. echo "There are " . $d2 ." days until 4th of July.";