You are here: Re: php within javascript « PHP Programming Language « IT news, forums, messages
Re: php within javascript

Posted by Ben Holness on 05/05/06 02:28

> Or should I be able to use php code freely from within
> the Java script and I have simply created a php syntax error.

As far as my understanding goes, with Apache 1.2 or 2, php can be used
freely in javascript code as long as the file is named .php (or another
exension that is configured for PHP). If the javascript is in a .js file
while is included in the header with a link, then I am not sure if it
works.

Also, in your code you have:

> echo"] = 'img/2005/horiz/image";
> echo $i;
> echo ".jpg'";
> i++;
> }
> ?>

It's probably an email typo, but that needs to be $i++ on the fourth line
down.

Cheers,

Ben

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация