Re: Printing large pieces of HTML markup inside the <?php ?> tags..?

From: Date: Thu, 14 Jun 2012 05:32:19 +0000
Subject: Re: Printing large pieces of HTML markup inside the <?php ?> tags..?
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-30913@lists.php.net to get a copy of this message
Yup, that's it - HEREDOC syntax is what was referring to - thanks - and, here's a better version of some output - since you don't seem to be able to specifically include PHP code itself within delimiters, although you can output variables, etc.: <?php $var1 = "hulloWorld"; print <<<HTML <table align="center" border="1"> <tr>
    <th colspan="2">$var1</th>
</tr> <tr> <th>Caption</th><td>column</td> </tr> </table> HTML; ?> Stay well Jacob Kruger Blind Biker Skype: BlindZA '...fate had broken his body, but not his spirit...' ----- Original Message ----- From: "Keith Davis" <keithdavis@pridedallas.com> To: <php-windows@lists.php.net> Sent: Thursday, June 14, 2012 7:18 AM Subject: Re: [PHP-WIN] Printing large pieces of HTML markup inside the <?php ?> tags..? Are you referring to the HEREDOC syntax? http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc Sent from my iPhone 4s On Jun 14, 2012, at 12:10 AM, "Jacob Kruger" <jacob@blindza.co.za> wrote:
Came across some code/script/markup similar to the following syntax, and not too sure if it falls under a specific template framework, etc.?: <?php print <<<HTML <form method="POST" action="attendance.php"> <table class="defaultTbl">
       <tr>
           <th colspan="2">Attendance Register Search</th>
       </tr>
       <tr>
           <td class="caption">$sDivisionName</td>
           <td>
HTML; ?> That's just a piece of it, so don't worry about HTML markup missing pieces - more interested in print <<<HTML...HTML; part..? Stay well Jacob Kruger Blind Biker Skype: BlindZA '...fate had broken his body, but not his spirit...'
This message (including any attachments) may contain confidential or otherwise privileged information and is intended only for the individual(s) to which it is addressed. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message or that arise as a result of e-mail transmission. If verification is required please request a hard-copy version from the sender. www.pridedallas.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.windows (#30913) next »