Should be simple right? Well I've been at the PC for 16 hours so far and the answer is probably screaming at me in the face, but I can't hear it...
This code...
$differenceInSeconds = 448005;
if($differenceInSeconds >= "86400"){
$calcDays = floor($differenceInSeconds / 86400);
if($calcDays = "1"){
$daysPlural = "day";
}else{
$daysPlural = "days";
}
$lastupdate = $calcDays." ".$daysPlural." ago";
}
echo $lastupdate;
Outputs this...
1 day ago
When it should output this...
5 days ago
Any ideas folks? Thanks,
Michael