View Single Post
Old 08-23-2003, 04:23 PM   #4 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
I like using the HEREDOC style when I can, something like this:

PHP Code:
<?
echo <<< END

<tr>
<td>
{$data['key1']}</td>
<td>
{$data['key2']}</td>
<td>
{$data['key3']}</td>
</tr>
<tr>
<td>
{$data['key4']}</td>
<td>
{$data['key5']}</td>
<td>
{$data['key6']}</td>
</tr>

END;
?>
That should work fine; note that your closing END cannot have any indentation, no spaces or tabs. Somewhat of a limitation, IMHO. IIRC, you need to put braces around arrays, like {$array['key']} but normal variables don't need anything around it.

Does save alot of typing quotes.
bdl is offline   Reply With Quote