Re: Regular expression newbie question, convert this: [::word1 \" word2 \" word3::] to : ".word1 " word2 " word3."

From: Date: Sun, 16 Jun 2002 01:55:34 +0000
Subject: Re: Regular expression newbie question, convert this: [::word1 \" word2 \" word3::] to : ".word1 " word2 " word3."
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-102369@lists.php.net to get a copy of this message
Hi Lance: On Sun, Jun 16, 2002 at 01:31:45AM +0800, Lance wrote: > > i was developing an application that will read in the content of a html > file. and within this html file contains php variables which will be > replaced using the eval() function with its required value. and within > this html, i want to be able to run php functions. > ... snip ... > eval("\$rs = \"<span class=\"normal\">".date("m d > y")."$phpVar</span>\";"); Why not merge your PHP and HTML straight up like this? <span class="normal"><?php echo date('m d y') . $phpVar; ?></span> Then, just have the whole HTML file parsed as PHP. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

« previous php.general (#102369) next »