I am trying to output a table using php variables like this:
echo "<tr>";
echo "<td>".$var1."</td>";
echo "<td>".$var2."</td>";
echo "</tr>";
It works fine if both variables exist.. but if $var1 is null, the $var2 value is outputted to the firs column in the HTML table. Is there a way to properly output the columns by naming them? P.S: I can't do "if $var == NULL ...." for some coding reasons. I want to control the HTML output if possible.