Return to Snippet

Revision: 34827
at October 28, 2010 21:08 by chopbust


Updated Code
function alertJavascript($message){
echo "	<script type=\"text/javascript\">alert(\"$message\");</script> " ;
}

Revision: 34826
at October 28, 2010 21:07 by chopbust


Initial Code
function alertJavascript($message){
		echo "	<script type=\"text/javascript\">
				alert(\"$message\");
			</script> " ;
}

Initial URL


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

Initial Title
PHP Function to call up Javascript Alert

Initial Tags
javascript, php

Initial Language
PHP