Forum Moderators: coopster

Message Too Old, No Replies

echo html tags or not

         

nuwanda

11:20 pm on Nov 29, 2005 (gmt 0)

10+ Year Member



Hi

Is the any advantage to this:

<?

echo "<input type=\"submit\" value=\"Empty Cart\" name=\"empty_cart\">";
echo "<input type=\"submit\" value=\"Update Cart\" name=\"update_cart\">";

?>

over this...

<input type="submit" value="Empty Cart" name="empty_cart">
<input type="submit" value="Update Cart" name="update_cart">

...or vice versa?

Thanks.

Ross

charlier

11:30 pm on Nov 29, 2005 (gmt 0)

10+ Year Member



None, just use the one that is most convienient. If your tags are embedded in a lot of code then probably the echo is less typing. Remember the 'c' maxim, use the minium number of keystrokes :-)

jatar_k

9:54 pm on Nov 30, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



take a look at this thread from our library
Benchmarking PHP text output [webmasterworld.com]