I'm very new to PHP so I'm still learning how to do stuff. I cannot figure out what is wrong with this code:
if($row->played_time >= 60){
$time = round($row->played_time,2) / 60 " mins";}
elseif($row->played_time >= 3600){
$time = round($row->played_time,2) / 60 / 60 " hours";}
elseif($row->played_time >= 86400){
$time = round($row->played_time,2) / 60 / 60 / 24 " days";}
else{
$time = round($row->played_time,2) " secs";
}
The code works fine if I don't use round or include the secs, mins, hours or days but like that I get this error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /usr/www/eggroup/forum/rank.php on line 37
Line 37 is the second line ($time = round($row->played_time,2) / 60 " mins";}).
How can I do what I need it to do?