I wan to convert the following code from this
$diff = strtotime($row['start']) - strtotime($current);
if ($diff < 7200) {
echo 'Starts soon';
} else if ($diff <= 0) {
echo 'Started';
} else {
echo 'Starts';
}
to this ?
<?= ($current > $row['start']) ? 'Started' : 'Starts'; ?>
How can ( if possible ) be written in such way ?
It’s not very readable, so I wouldn’t use it but here you go: