Posted by Rami Elomaa on 04/24/07 07:29
"Michael Placentra II" <sumguyovrthar@gmail.com> wrote in message
news:MOCdnSyCHaVot7DbnZ2dnUVZ_oipnZ2d@comcast.com...
> Pass a string, which is the name of the function, and eval() that.
>
> function bufferStuff( $func )
> {
> ob_start();
> eval( "$func();" );
Eval() is not required here. You can just say $func(); and it'll work as
long as $func is a valid name of a function.
http://fi2.php.net/manual/en/functions.variable-functions.php
> return ob_get_clean();
> }
--
Rami.Elomaa@gmail.com
"Good tea. Nice house." -- Worf
[Back to original message]
|