开发者

Parsing multiple PHP code blocks among HTML

When inserting

<?php  ?>

Chunks into html it is easier for me to do ...

<?php  ?> some html <?php  ?> some html  <?php  ?> ect. 

Is it b开发者_如何转开发etter to do something like this...

<?php  echo "some html" ect. ?>

and if so how much is using the first method going to slow down my code?


The PHP interpreter evaluates only the code between a pair of <?php ?> tags. While there might be a speed difference (I doubt it), even if one existed the difference would be completely undetectable.

I'd go with code readability.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜