<br><br><div class="gmail_quote">On Sun, Jul 29, 2012 at 1:18 PM, <span dir="ltr"><<a href="mailto:rouslan@placella.com" target="_blank">rouslan@placella.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="mailto:rouslan@placella.com" target="_blank">rouslan@placella.com</a> ha scritto:<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thilina Buddika Abeyrathna <<a href="mailto:thilinaabeyrathna@gmail.com" target="_blank">thilinaabeyrathna@gmail.com</a>> ha scritto:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Rouslan,<br>
<br>
How do I use addHtml() function for the following type code,<br>
<div class="-------"><br>
<?php include('libraries/example.<u></u>php'); ?><br>
</div><br>
I tried,<br>
$response->addHTML(<div class="........">)<br>
include 'libraries/example.php'<br>
$response->addHTML(</div>)<br>
<br>
But nothing displayed.<br>
</blockquote>
<br>
Something like this:<br>
<br>
$response->addHTML('<div class="someClass">');<br>
ob_start();<br>
include 'libraries/example.php';<br>
$content = ob_get_contents();<br>
ob_end_clean();<br>
$response->addHTML($content);<br>
$response->addHTML('</div>');<br>
</blockquote>
<br></div>
Oh, and ideally, you'd refactor the library, so that there is a function to call, then the above can be reduced to:<br>
<br>
include 'libraries/example.php';<div class="im"><br>
$response->addHTML('<div class="someClass">');<br></div>
$response->addHTML(<u></u>someFunction());<div class="HOEnZb"><div class="h5"><br>
$response->addHTML('</div>');<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
And can we use both addHtml() and 'echo' in a script?<br>
</blockquote>
<br>
Without output buffering, no. And using output buffering just to be<br>
able to mix echo and addHTML functions should be frowned upon.<br>
<br>
See more here:<br>
<a href="http://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4#Hello_world" target="_blank">http://wiki.phpmyadmin.net/<u></u>pma/Generating_pages_and_ajax_<u></u>responses_in_pma4#Hello_world</a><br>
and here:<br>
<a href="http://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4#Overwriting_response_keys" target="_blank">http://wiki.phpmyadmin.net/<u></u>pma/Generating_pages_and_ajax_<u></u>responses_in_pma4#Overwriting_<u></u>response_keys</a><br>
<br>
Bye,<br>
Rouslan<br>
</blockquote>
<br>
</div></div></blockquote></div><br>Thank you very much
Rouslan.<br clear="all"><div><br></div>-- <br><font face="georgia, serif">Regards.</font><br><br><font face="'trebuchet ms', sans-serif" color="#660000">Thilina Abeyrathna</font><font face="georgia, serif"><br></font><div>
<font face="georgia, serif" size="1">Gtalk : thilinaabeyrathna</font></div><div><font face="georgia, serif" size="1">skype: thilinabuddika88</font></div><div><font face="georgia, serif"><font size="1"><a href="http://thilinaa.wordpress.com" target="_blank">thilinaa.wordpress.com</a> <br>
</font><br></font></div><br>