How can I do the following...
$rest = ereg_replace("(&[a-z]+)", icons('\1'), $rest);
(replace patterns with an output of a function)
...other way?