
Thilina Buddika Abeyrathna <thilinaabeyrathna@gmail.com> ha scritto:
Hi Rouslan,
How do I use addHtml() function for the following type code, <div class="-------"> <?php include('libraries/example.php'); ?> </div> I tried, $response->addHTML(<div class="........">) include 'libraries/example.php' $response->addHTML(</div>)
But nothing displayed.
Something like this: $response->addHTML('<div class="someClass">'); ob_start(); include 'libraries/example.php'; $content = ob_get_contents(); ob_end_clean(); $response->addHTML($content); $response->addHTML('</div>');
And can we use both addHtml() and 'echo' in a script?
Without output buffering, no. And using output buffering just to be able to mix echo and addHTML functions should be frowned upon. See more here: http://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4#H... and here: http://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4#O... Bye, Rouslan