how to display variable value in alert box in php code example
Example: alert a php variable
echo '<script type="text/javascript">alert("'.$error.'");</script>';
echo '<script type="text/javascript">alert("'.$error.'");</script>';