残り○日とかいうカウントダウンをPHPでやる

カウントダウン。

$today = date('Y/m/d'); //現在時刻を取得
$day1 = strtotime($today); //英文形式の日付を Unix タイムスタンプに変換する
$day2 = strtotime('任意の日付');
echo ($day2 - $day1) / (60 * 60 * 24). '日'; //表示

//例
$day1 = strtotime('2017-06-13');
$day2 = strtotime('2017-06-19');
echo ($day2 - $day1) / (60 * 60 * 24). '日'; //6日