my code works perfectly and I got the time difference but now I need to check whether the difference is less or more than a month old and I can't figure it out
following is my codes what else do I need to do
<?php if (time_ago($ticket->created) < 30) {
$date = time_ago($ticket->created);
echo '<div class="alert alert-danger" role="alert">
This ticket is '.$date.' old
</div>';
}
else {
echo "ok";
}
?>
I checked with 30 but it does not work it shows a ticket which was lodged even less than a month ago