View Single Post
Old 08-23-2003, 04:36 PM   #1 (permalink)
Epsilon
Regular Contributor
 
Epsilon's Avatar
 
Join Date: Mar 2003
Location: Las Vegas, NV
Posts: 131
Epsilon is on a distinguished road
Switching in & out of PHP/HTML

I'm putting together a script that is going to parse sports stats from an XML document and load all the data into an array. Then I need to print everything out in tables. So what I had in mind might look something like this:

Code:
<tr>
<td><? echo("$data['key1']"); ?></td>
<td><? echo("$data['key2']"); ?></td>
<td><? echo("$data['key3']"); ?></td>
</tr>
<tr>
<td><? echo("$data['key4']"); ?></td>
<td><? echo("$data['key5']"); ?></td>
<td><? echo("$data['key6']"); ?></td>
</tr>
The question is whether it's bad design to switch in/out of PHP mode so much (maybe several hundred times in one page).

Is it worthwhile to just print out the table tags in PHP with print(""), or does it really matter much? It's on a 2GHz dedicated server with 1GB of RAM.
__________________
--Epsilon--
Epsilon is offline   Reply With Quote