php if mag time_online echo font color DF6161 Offline font else echo f

1
2
3
4
5
6
7
8
9
<?php
if($mag[time_online]<$d){echo" <font color=#DF6161>Offline</font>";
}else{
echo" <font color=#33CC33>Online</font>";
}
Правильнее:
echo '<font '.($mag['time_online'] < $d ? 'color=#DF6161>Offline' : 'color=#33CC33>Online').'</font>';