0
由于我在处理大代码,我想知道是否有任何可能性更容易用PHP代码替换HTML,以便例如<?php $HelloWorld ?>
在文档中会变成类似--HelloWorld--
的东西?或者例如循环会去从:用PHP代替HTML
<?php
for ($x = 0; $x <= 10; $x++) {
echo "The number is: $x <br>";
}
?>
为了简化管柱像
-(10)-{The number is: $x <br>}-
有许多可以做这样的事情的模板库。 – Barmar
也许看看Smarty? http://www.smarty.net/ – hRdCoder
https://twig.sensiolabs.org/,http://www.smarty.net/ – circusdei