note 87344 deleted from function.preg-replace by thiago

From: Date: Mon, 01 Dec 2008 11:39:22 +0000
Subject: note 87344 deleted from function.preg-replace by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147478@lists.php.net to get a copy of this message
Note Submitter: Borey ---- Hello I am the admin of http://www.carsellers.ru/ I got this function for templates. <?php $file = "filename.tpl"; $contents = file_get_contents($file); $website_tpl = 'something'; $text = preg_replace('/\{(\w+)\}/e', '$$1_tpl', $TEMPLATE); echo $text ?> With this if you have a file filename.tpl and you have the text {website} it will replace it with something as you can see above! -<a href="http://www.carsellers.ru">продажа авто</a>

« previous php.notes (#147478) next »