First of all, sorry for the title, I didn't know how to describe my problem.
I have the following piece of code (simplified).
if ($red && $italic)
echo "<tr class='red italic'>";
elseif ($italic)
echo "<tr class='italic'>";
elseif ($red)
echo "<tr class='red'>";
else
echo "<tr>";
Is there a way to simplify this, i.e. not use 8 lines? I know that's not very important but I was wondering if it could be possible.
Thanks!