用PHP代码试写出几个输出一段 HTML 代码的方法。

作者:admin日期:2011-05-13 10:58:01 点击:247

 嗯,你可以使用 PHP 中任何一种输出语句,包括 echoprintprintf,大部分人都使用如下例的 echo
echo "My string $variable";你也可以使用这种方法:
echo <<<ENDThis text is written to the screen as output and this $variable is parsed too. If you wanted you can have

<span> HTML tags in here as well.</span> The END; remarks must be on a line of its own, and can't contain any extra white space.END;

上一篇: 在PHP中,.include 和 include_once 有什么分别?require 又如何?

下一篇: PHP实战实用应用班