Aaron, That's perfect! Thanks. Ade. 2008/12/29 Aaron D. Campbell <aaron at xavisys.com> > You can do something like this: > > function whatever($echo=false) { > $output = ''; > foreach(){ > $output .= "something"; > } > if ($echo) > echo $output; > return $output; > } > >