HTML output in PHP - looking for a really elegant way
I am learning a little bit more about PHP syntax and efficiency. I am actually more a HTML and CSS lover but since I work a lot with Wordpress I have to look deeper into PHP.
So here I am.
To the point.
I would like to know if somebody can tell me if this can be done more efficient respectively with an easier syntax:
I would like to have get code that is indented properly. Ideal would be if I can just use tabstops within the code and without having to write all this \n and \t.
$output = "\n\t\t".'<tr class="' . $funky_zebra . '" title="See details for this Event">';
$output.= "\n\t\t\t".'<td class="ev-date">' . $event_start . $event_end . '</td>';
$output.= "\n\t\t\t".'<td class="ev-name"><a href="' . $event_permalink . '">' . $event_title . '</a></td>';
$output.= "\n\t\t\t".'<td class="ev-location">' . $event_location . '</td>';
$output.= "\n\t\t\t".'<td class="ev-status ev-status-' . $event_status_color . '">' . $event_status . '</td>';
Any help is appreciated.