Yes I know it should be easy - but it doesn't work:
I have this code:
$msg = "Hello,
Nice to be here!";
$msg=str_replace("\n","",$msg);
echo "<script language=\"JavaScript\" type=\"text/javascript\">
alert ($msg);
</script>
Still I have the line breaks so the javascript can't run.
Any ideas?
Assaf