PHP Is echoing snippets slower than echoing all at once?

sidneymango

New Member
I have a theoretical question about page load time:Suppose I want the following output:\[code\]<a class="class-a" href="http://stackoverflow.com/questions/10563899/www.google.com"></a>\[/code\]Is it faster (with respect to load time and efficiency) to do:\[code\]<a class="<?php echo $class_a; ?>" href="http://stackoverflow.com/questions/10563899/<?php echo $url; ?>"></a>\[/code\]or\[code\]echo "<a class='$class_a' href='http://stackoverflow.com/questions/10563899/$url'></a>";\[/code\]This is a microcosm of a bigger issue-- if I'm using echo multiple times on the page is it better to try to condense HTML output into one variable and echo it in one go??Thanks!
 
Back
Top