Countdown timer built on PHP and jQuery?

前端 未结 6 799
孤街浪徒
孤街浪徒 2020-12-06 20:37

After spending the last 45 minutes looking around for a solution, I can\'t seem to find an easy solution to creating a countdown timer using PHP and jQuery. Most already bui

6条回答
  •  独厮守ぢ
    2020-12-06 20:54

    $dateFormat = “d F Y — g:i a”;
    $targetDate = $futureDate;//Change the 25 to however many minutes you want to countdown change date in strtotime
    $actualDate = $date1;
    $secondsDiff = $targetDate – $actualDate;
    $remainingDay     = floor($secondsDiff/60/60/24);
    $remainingHour    = floor(($secondsDiff-($remainingDay*60*60*24))/60/60);
    $remainingMinutes = floor(($secondsDiff-($remainingDay*60*60*24)-($remainingHour*60*60))/60);
    $remainingSeconds = floor(($secondsDiff-($remainingDay*60*60*24)-($remainingHour*60*60))-($remainingMinutes*60));
    
    $actualDateDisplay = date($dateFormat,$actualDate);
    $targetDateDisplay = date($dateFormat,$targetDate);
    
    
    
     0)){ ?>
    
    
    
    
    

    For more information visit urfusion

提交回复
热议问题