Re: [PHP] heredoc question

2006-05-05 Thread Al
Robert Cummings wrote: On Fri, 2006-05-05 at 10:40, Al wrote: How can I include "place holders" for variables in a heredoc such that after the heredoc is declared, I can assign the variables? I have a config file with a heredoc string declared. I'd like to keep the include config.inc at the

Re: [PHP] heredoc question

2006-05-05 Thread Dave Goodchild
Or just use str_replace On 05/05/06, John Nichel <[EMAIL PROTECTED]> wrote: Al wrote: > How can I include "place holders" for variables in a heredoc such that > after the heredoc is declared, I can assign the variables? > > I have a config file with a heredoc string declared. I'd like to keep

Re: [PHP] heredoc question

2006-05-05 Thread Robert Cummings
On Fri, 2006-05-05 at 10:40, Al wrote: > How can I include "place holders" for variables in a heredoc such that after > the heredoc is declared, I can assign the > variables? > > I have a config file with a heredoc string declared. I'd like to keep the > include config.inc at the top of my pag

Re: [PHP] heredoc question

2006-05-05 Thread Paul Novitski
At 07:40 AM 5/5/2006, Al wrote: How can I include "place holders" for variables in a heredoc such that after the heredoc is declared, I can assign the variables? Al, Escape the $'s in your heredoc expression so that the variable names remain and aren't evaluated, then eval() the whole expres

Re: [PHP] heredoc question

2006-05-05 Thread John Nichel
Al wrote: How can I include "place holders" for variables in a heredoc such that after the heredoc is declared, I can assign the variables? I have a config file with a heredoc string declared. I'd like to keep the include config.inc at the top of my page. Down in the page, when I call the h

Re: [PHP] Heredoc question

2003-06-06 Thread Mark
net > > - Original Message - > From: "Jennifer Goodie" <[EMAIL PROTECTED]> > To: "Sparky Kopetzky" <[EMAIL PROTECTED]>; "PHP General" > <[EMAIL PROTECTED]> > Sent: Thursday, June 05, 2003 16:47 > Subject: RE: [PHP] Heredoc ques

RE: [PHP] Heredoc question

2003-06-06 Thread Jennifer Goodie
> That's fine for that but I have several places that use if's and else's... > > Sparky > > http://us4.php.net/types.string says that heredoc acts just like double > > quoted, which would mean it expands variables, so I would try just Than I would suggest reading the manual page (the link I gave)

Re: [PHP] Heredoc question

2003-06-06 Thread Sparky Kopetzky
That's fine for that but I have several places that use if's and else's... Sparky - Original Message - From: "Jennifer Goodie" <[EMAIL PROTECTED]> To: "Sparky Kopetzky" <[EMAIL PROTECTED]>; "PHP General" <[EMAIL PROTECTED]>

RE: [PHP] Heredoc question

2003-06-06 Thread Jennifer Goodie
> Can one use within the heredoc syntax or is there > another way?? I'm trying to dynamically generate email from > generic text but with obvious additions, like this: http://us4.php.net/types.string says that heredoc acts just like double quoted, which would mean it expands variables, so I would

Re: [PHP] Heredoc question

2003-06-06 Thread Sparky Kopetzky
s/Internet Services www.blackmesa-isp.net - Original Message - From: "Jennifer Goodie" <[EMAIL PROTECTED]> To: "Sparky Kopetzky" <[EMAIL PROTECTED]>; "PHP General" <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 16:47 Subject: RE: [PHP] Heredoc q

Re: [PHP] Heredoc question

2003-06-05 Thread Joel Rees
> That's fine for that but I have several places that use if's and else's... AFAIK, you can't do conditionals inside a here doc. But then you don't have to build your entire output string in one here doc, either. Hmm. Maybe you're trying to build templates? -- Joel Rees <[EMAIL PROTECTED]> --