I am trying to run a javascript function inside my PHP code but the javascript function is not calling, or not working, but when I try to run it without the PHP it works fine:
<div class="chatbox">
<div class="chatbox_head">chat</div>
<div class="chatbox_body">
<?php
$n = 'Ozoibekwe';
$m = 'joy';
echo '
<div class="sidebar-name">
<!-- Pass username and display name to register popup -->
<a href="javascript:register_popup('.$n.', '.$m.');">
<img width="30" height="30" src="user_pix/david.jpg" />
<span>Ozoibekwe joy</span>
</a>
</div><br> ';
?>
</div>
</div>
$nand$m. Of course, your code is a bad practice anyways.