Re: Problen set variables in fopen

From: Date: Wed, 12 Jul 2000 23:21:55 +0000
Subject: Re: Problen set variables in fopen
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-6339@lists.php.net to get a copy of this message
In article <00071221204301.02300@hape>, straub@i-netpartner.de (Hans-Peter Straub) wrote: > Hello, > > sorry i'm new to PHP and programming, but i have a simple question: > > I do a > > $template = fopen ("incdir/emplate.txt","r"); > > while (!feof($template)) { > $output=fgets($template,256) ; > $testmessage.=$output ; > } > > and in the template.txt files there are some variables wrote down in the form: > > -->> $variable > > I want to set some values to this variables when while is running, but i only > get teh clear text "$variable" in output. How can i get changed this to set the > values of the vars to this?? I think you want eval() function... -- Richard Lynch | If this was worth $$$ to you, buy a CD US Customer Support Director | from one of the artists listed here: Zend Technologies USA | http://www.L-I-E.com/artists.htm http://www.zend.com | (this has nothing to do with Zend, duh!)

« previous php.general (#6339) next »