i am writing a script that checks for increase in date to know whether or not to add a value to an existing variable. Though i have been able to get some help here, it still appears i'm stuck with checking if the day has increased.
PHP CODE
<?php
$now = time(); // or your date as well
$your_date = strtotime("2018-09-05");
$datediff = $now - $your_date;
$alreadySpentDays = round($datediff / (60 * 60 * 24));
$userEarnings = 0;
// i want to be able to check if the day has increased and if it has i want to be able to add $10 to userEarning variable daily
?>
<p><?=$userEarnings?></p>