Jump to content

What format is recommended?


UrbanDweller

Recommended Posts

Hey,

 

I have always wondered if there is a correct way of displaying variables inside html. Typically I would echo each variable inside php tags when displaying outside of a loop but what would you recommend for a while loop while more than say 5 variables to display?

 

echo "<tr><td>".$var1."</td></tr>";

OR

<tr><td><?php echo $var1; ?></td></tr>

Link to comment
https://forums.phpfreaks.com/topic/260334-what-format-is-recommended/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.