Re: string as file

From: Date: Fri, 10 Aug 2007 13:12:21 +0000
Subject: Re: string as file
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-260567@lists.php.net to get a copy of this message
On Thu, Aug 09, 2007 at 03:25:27PM -0500, Greg Donald wrote: > On 8/9/07, Rick Pasotto <rick@niof.net> wrote: > > Does php have a facility similar to python's stringIO? > > > > What I'm wanting to do is similar to a mail merge. IOW, I know I can > > create an include file like: > > > > $out = <<<EOT > > This is an example of $var1 and $var2. > > EOT; > > > > and then after assigning values to $var1 and $var2 include that > > file. I can later use different values for $var1 and $var2 and get a > > different $out with a second include. > > eval() Explain. One word responses really don't do any good. Exactly *what* would be the argument to eval()? -- "In vices, the very essence of crime -- that is, the design to injure the person or property of another -- is wanting. It is a maxim of law that there can be no crime without a criminal intent." -- Lysander Spooner Rick Pasotto rick@niof.net http://www.niof.net

« previous php.general (#260567) next »