Writing text without switching from PHP to HTML
posted by iup85 on 2009-11-11 00:33:45
Hi
Newb question here. Is there any way I can get a or equivalent
without closing my PHP tags and re-opening them afterwards?
Thanks for any help
Newb question here. Is there any way I can get a
<br />
without closing my PHP tags and re-opening them afterwards?
Thanks for any help
0
Echo what you want, though this is uglier than hell. PHP is an excellent
templating language and switching between HTML and PHP is really not that
big of a deal. Anyway....or
you can use heredoc syntax to put a full HTML document inside:or
templating language and switching between HTML and PHP is really not that
big of a deal. Anyway....
echo "<br />";
you can use heredoc syntax to put a full HTML document inside:
$str = <<<EOD Example of string spanning multiple lines using heredoc syntax. EOD;
$name = 'MyName'; echo <<<EOT My name is "$name". I am printing some text. This should print a capital 'A': \x41 EOT;
0
echo "<p> Your HTML Code</p>";
Answer the question
Top Users
- dail (12)
- livin52 (3)
- camu (3)
- softweb (2)
- Nadine (1)
- Josware (1)
- lfelipecr (1)
- gregoriohc (1)
- Mitu (1)
- ryan714 (1)