how are u parsing
| From: | Marc Logemann | Date: | Thu, 05 Jul 2001 07:52:18 +0000 |
| Subject: | how are u parsing | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-1115@lists.php.net to get a copy of this message | ||
Hi,
first of all, i love your engine.
My question: How do you parse the vars in the templates? (i mean from the
php view)
Do you use string functions or ereg_* or preg_* functions, to replace vars
with assigned text?
I am just writing some i18n functions in php and i get better results with
strstr in a loop, as with preg_replace() (not in a loop because you can
do tricky things like
preg_replace("/<\\$([0-9])>/e", '$parmarray[\1]', $string);
I think you should have some experiences in writing parsers :))
thx
-----------------------
Marc Logemann
Morelogs GmbH & Co. KG
Chief Software Architect
-----------------------