I have created a very simple alert function in php. It works, however, with a problem.
Whenever I call it like this:
Alert("Pedido finalizado");
It works, but when I put a \ n to have a break if line, it does not work. Example:
Alert("Pedido \n finalizado");
Does anyone know what it can be? in the browser the only error that appears and this:
SyntaxError: Unexpected EOF
Good follows the function:
function Alert($msn){
?>
<script>
alert('<?=$msn?>');
</script>
<?php
}