Re: PHP & image rollovers question...
| From: | Julio Nobrega Trabalhando | Date: | Tue, 15 Jan 2002 18:36:34 +0000 |
| Subject: | Re: PHP & image rollovers question... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80607@lists.php.net to get a copy of this message | ||
Check out when you can use " and '
Any number of ' inside " gets printed and $vars are parsed (i.e,
'interpreted by php')
Any number of " inside of ' gets printed and $vars are NOT parsed.
echo "<script style="javascript">"; is wrong because you start at the
first " and the after the second " you have a 'j', from Javascript.
Another two possibilities:
1) You escape the "s:
echo "<script style=\"javascript\">";
2) You put " inside ' so it will get printed:
echo '<script style="javascript">';
Hope it helps,
--
Julio Nobrega.
Um dia eu chego lá:
http://sourceforge.net/projects/toca
Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
"Phil Schwarzmann" <pschwar@jhmi.edu> wrote in message
news:sc442a61.014@cis27.hosts.jhmi.edu...
> Hello, im brand new to the mailing list and fairly new to PHP.
>
> I apologize if this topic has come up before but...I'm having trouble
> embedding javascript (in particular - image rollovers) into my PHP
> script. When the page loads, I get errors for each of the javascript
> calls within my script.
>
> I'm using 'echo' to display my data.
>
> Any help??
>
> Thanks so much!
> -Phil
> baltimore
>