Hi Everyone,
Thanks for pointing me to heredoc syntax. I've got it working out nicely now
;)
Regards,
Feris
On 12/20/07, Daniel Brown <[EMAIL PROTECTED]> wrote:
>
> On Dec 19, 2007 10:38 PM, php mail <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > Is it possible to assign variable to a block of
cembre 2007 13:17
To: php-general@lists.php.net
Subject: Re: [PHP] Assign variable to a block of html code
You could just swap all the double quotes in the HTML tags for single quotes -
that would work in this instance...
$myblokvar = "
...
";
Or perhaps a HereDoc syntax:
$myblokva
Yeps,
Sorry bout that.
Thnks for pointing it out.
Xavier
-Original Message-
From: Darren Whitlen [mailto:[EMAIL PROTECTED]
Sent: jeudi 20 décembre 2007 13:13
To: php-general@lists.php.net
Subject: Re: [PHP] Assign variable to a block of html code
Xavier de Lapeyre wrote:
> You sho
On Dec 19, 2007 10:38 PM, php mail <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Is it possible to assign variable to a block of html code ?
>
> Something like this :
>
> $myblokvar = "
>
>
>
[snp]
>
>
>
> ";
>
> Although example above is not working, what I want to achieve
You could just swap all the double quotes in the HTML tags for single quotes -
that would work in this instance...
$myblokvar = "
...
";
Or perhaps a HereDoc syntax:
$myblokvar = <<
...
EndOfMyHTMLBlock;
Then you don't need to worry about what quotes you use, and if you start putting
stuff
lacing a variable.
To use it afterwards simply call the $mylokvar variable.
Hope it helped!
Xavier
Web Developer
Site: www.eds.mu
-Original Message-
From: Stephen Johnson [mailto:[EMAIL PROTECTED]
Sent: jeudi 20 décembre 2007 07:43
To: php mail; PHP General List
Subject: Re: [PHP] As
007 07:43
To: php mail; PHP General List
Subject: Re: [PHP] Assign variable to a block of html code
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" <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Is it p
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" <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Is it possible to assign variable to a block of html code ?
>
> Something like this :
>
> $myblokvar = "
>
>
>
>
>
8 matches
Mail list logo