Posted By

chopbust on 10/28/10


javascript php alert

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


PHP Function to call up Javascript Alert

 / Published in: PHP

This is to call up Javascript alert through PHP. I hate switching between echoing Javascript while writing PHP so I wrote one in PHP.

  1. function alertJavascript($message){
  2. echo " <script type=\"text/javascript\">alert(\"$message\");</script> " ;
  3. }

Report this snippet  

You need to login to post a comment.