Re: php and javascript error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Edward Kay wrote:

you've got a stay quote mark in one of your PHP vars.

Not it, I looked and there's nothing there.


I'm sure it's because you've got some stray characters in your output that
mess it up. It would help if you actually posted the source rather than just
saying it's OK, when it clearly isn't.


The problem wasn't a stray apostrophe. Brad Fuller was dead on. It was the space in the window name option of the javascript. It works as expected once the space is removed.


PPS: It's advisable not to use the short tags, use <?php instead of <?

Can you tell me why? Is it just a personal preference?

If you move to another server where the short tags option is off, your code
will break. From the manual:

Using short tags should be avoided when developing applications or libraries
that are meant for redistribution, or deployment on PHP servers which are
not under your control

My scripts aren't meant for distribution also they will only ever be delpoyed on a server that I control. Thanks for the tip though and thanks to everyone that helped.

Ed

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux