SyntaxFix
Write A Post
Hire A Developer
Questions
Try this:
Define a funciton:
<?php function phpAlert($msg) { echo '<script type="text/javascript">alert("' . $msg . '")</script>'; } ?>
Call it like this:
<?php phpAlert( "Hello world!\\n\\nPHP has got an Alert Box" ); ?>