How can I render a view script into a variable within an action controller?
I want to render a view and insert it into a database table as a string.
I am using Zend Framework 1.11
From your controller you can do:
$view = new Zend_View();
$view->some_var = "some_value";
// ... more variable assignments
$output = $view->render('some script');
Then you can store $output in your database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With