Hi

Can I do this????

$string = file.tpl;

while (list($pattern, $replacement) = each($array)) {
ereg_replace ($pattern, $replacement, $string);
}

echo $string;



note some assumptions below:

$array contains an assoc array:

first  foo
second bar
third  rab
fourth oof

file.tpl is this:

some html {first} 
more html {second}
even more html {third}
lots more html {fourth} 

This seems like a slow way to do this...
any advice is welcome!

tia!
jaxon


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to