Re: heredoc question

From: Date: Fri, 05 May 2006 17:41:51 +0000
Subject: Re: heredoc question
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-235660@lists.php.net to get a copy of this message
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 top of my page. Down in the page, when I call the heredoc variable, I'd like to replace the "place holders" with a values assigned in the page, below the include statement. I know I can break up the heredoc into several segments and put the variables between them; but, I rather not. Seems like there should be an obvious way to do this.
str_replace() ?? Rob.
Yes, that is the simplest solution. Now that you've refreshed my memory, I've done it that way in the past. Thanks...

« previous php.general (#235660) next »