alert in php echo code example
Example 1: alert in php
echo '<script>alert("Message")</script>';
Example 2: show alert in php
echo '<script language="javascript">alert("juas");</script>';
Example 3: php echo alert js
echo '<script type="text/javascript">alert("Data has been submitted to ' . $to . '");</script>';
Example 4: alert a php variable
echo '<script type="text/javascript">alert("'.$error.'");</script>';