UrbanDweller Posted April 4, 2012 Share Posted April 4, 2012 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 More sharing options...
Muddy_Funster Posted April 4, 2012 Share Posted April 4, 2012 Personaly I use echo "<tr><td>$var1</td></tr>"; without the . concat you're using Link to comment https://forums.phpfreaks.com/topic/260334-what-format-is-recommended/#findComment-1334285 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.