Re: [PHP4BETA] What goes here? Code Help needed

From: Date: Mon, 14 Feb 2000 12:45:37 +0000
Subject: Re: [PHP4BETA] What goes here? Code Help needed
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-10244@lists.php.net to get a copy of this message
Boz wrote: > > I have been wracking my brain over this code till my eyes are burning > anyone got an extra set that can tell me the missing code. The goal is a > very SIMPLE html template variable repalcement. The missing part has got > to be something with variable variable syntax or something but nothing I > have tried is working. Basically all I need at this point is something > to change $repped to the contents of each one of HP_ varibles > > Any help welcome. > > Template follows code listing [snip] > $finder = "%%" . $arg_list[$i] . "%%"; > SOMEWHERE IN HERE $repped should be equal to the "contents" of the > variable > that is named the same as the name of the element in $arg_list[$i] > through each loop quick-guess] try $repped = $GLOBALS[$arg_list[$i]]; > $templine = ereg_replace($finder, $repped, $templine); [snip] Also have a look at FastTemplates class, (sow it somewhere at phpbuiler.com) -- CIMPOESU Teodor, Web Programmer @ DIGICOM S.A. Bucharest, Romania @ Internet, site development @ teo@digiro.net , +(401)-330.47.28 official home page ~ http://www.digiro.net/ Internet web page ~ http://internet.digiro.net/

« previous php.version4 (#10244) next »