Do you have a question? Post it now! No Registration Necessary. Now with pictures!
April 24, 2007, 10:50 pm
rate this thread
engine simply replaces the tags with the appropriate
the template file is read into a string variable $string ,then i use
preg_replace_callback to process the tags.
now,i have a problem with the loops.i've though about this:
things to be
then i though about using preg_replace_callback twice,once to extract
the loop body,repeat it then insert it back into $string.
then use the final preg_replace_callback to replace all
is this a bad idea for server loads?
- Michael Placentra II
April 25, 2007, 9:42 pm
Re: how to loop in templates?
I did something similar, and it took me a while to get it to work right, but I didn't have it working for long enough to get an idea of server loads. I now use Smarty template engine because it has more advanced features than I had time to make myself. It didn't seem THAT slow, but I remember wishing it were faster.