Peter said:no you could not do that. if doing $this->html('bodytext') echos out the body text then the chances are the method is not returning it in a way that it can be used in a function. You would need to turn output buffering on and capture the output.
mholt said:What are you talking about?
Peter said:Something like this should work.
PHP:<?php function callback($buffer) { return str_replace('Consult', 'hahaha', $buffer); } ob_start("callback"); $this->html('bodytext') ob_end_flush(); ?>
Peter said:in what way is it not working? also remember str_replace is case sensitive. try replacing something stupid like spaces and see if it works then you know its simply your usage that is wrong.


