Re: PHP generated JavaScript
| From: | Richard Lynch | Date: | Tue, 21 Feb 2006 23:30:32 +0000 |
| Subject: | Re: PHP generated JavaScript | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230857@lists.php.net to get a copy of this message | ||
On Mon, February 20, 2006 1:59 am, Tim Burgan wrote:
> Is is possible to make an external Javascript with PHP.
>
> Am I doing this correcT?
>
> <?php
>
> header("Content-Type: text/javascript");
>
> $text = "Hello World";
>
> echo "alert('".$text."');";
You may need to include the trailing newline on this line...
I certainly would, needed or not.
> ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Like Music?
http://l-i-e.com/artists.htm