I need to make a function which takes all the values from a query, loops thru them one by one performing an ereg_replace on each one.
Would something like the following piece of code do it??
[code=php]
while(list($key, $value) = each($result)){
$mainbody = ereg_replace ("£%" . $key . "%£", $" . $key . ", $mainbody);
}[/code]
Any ideas?
Thanks in advance