- time: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$end = strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00')) - 1;
$now = time();
$numSecondsUntilEnd = $end - $now;
echo $numSecondsUntilEnd; // if required in seconds
echo "<br>";
echo $numSecondsUntilEnd / 60; // if required in minutes
echo "<br>";
echo $numSecondsUntilEnd / 3600; // if required in hours