Re: php-java formatting

From: Date: Mon, 23 Dec 2002 13:44:58 +0000
Subject: Re: php-java formatting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-129184@lists.php.net to get a copy of this message
> This all works fine except I want each empty field of the alert box to be on > it's own line. I try adding \n to the lines of the alert string but it > prints out the \n. How can I format this string so that it shows correctly > in the alert box? Just you use '\n' but you have to do something wrong. Look this: $x = 'Fill fields:\nfirstname\nsurname\nfirm'; echo "<script> alert('$x'); </script>"; On the screen you get: Fill fields: firstname surname firm It works in Netscape and Internet Explorer. -- Krzysztof Dziekiewicz

« previous php.general (#129184) next »