Re: Assign variable to a block of html code
| From: | Stephen Johnson | Date: | Thu, 20 Dec 2007 03:42:38 +0000 |
| Subject: | Re: Assign variable to a block of html code | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-266131@lists.php.net to get a copy of this message | ||
What you have will work, you just need to escape out the double quotes in
the html.
On 12/19/07 7:38 PM, "php mail" <php@phi-integration.com> wrote:
> Hi All,
>
> Is it possible to assign variable to a block of html code ?
>
> Something like this :
>
> $myblokvar = "
> <table width="487" border="0" cellspacing="0"
> cellpadding="0">
> <tr>
> <td><table width="487" border="0" cellspacing="0"
> cellpadding="0">
> <tr>
> <td><img src="images/bartitle_login.gif" alt="Login"
> width="475"
> height="30" /></td>
> <td> </td>
> </tr>
> <tr>
> <td class="produk"><table width="100%"
> border="0" cellpadding="3"
> cellspacing="2">
> <tr>
> <td class="katalog">
> <?=$log_info?>
> </td>
> </tr>
> </table></td>
> <td> </td>
> </tr>
> <tr>
> <td class="produk"> </td>
> <td> </td>
> </tr>
> </table></td>
> </tr>
> </table>
> ";
>
> Although example above is not working, what I want to achieve is something
> like that. Is it possible how can I do that ?
>
> Regards,
>
> Feris
--
Stephen Johnson
The Lone Coder
http://www.ouradoptionblog.com
*Join us on our adoption journey*
stephen@thelonecoder.com
http://www.thelonecoder.com
*Continuing the struggle against bad code*
--