Re: Regular expression newbie question, convert this: [::word1 \" word2 \" word3::] to : ".word1 " word2 " word3."
| From: | Lance | Date: | Sun, 16 Jun 2002 07:19:39 +0000 |
| Subject: | Re: Regular expression newbie question, convert this: [::word1 \" word2 \" word3::] to : ".word1 " word2 " word3." | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-102380@lists.php.net to get a copy of this message | ||
hi dan,
its because the html text is from user input. and i dont wanna spend too much time educating them on coding with php. sometime its a pain trying to get them to understand the codes. so i just wanna give them some simple commands in php whereby they can happily insert date formats on a page. something like what phpBB did on the [url] thingie.
lance
Analysis & Solutions wrote:
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