To say this in a more simple way:
PHP can produce anything or nothing.
PHP is a programming language, so is javascript.
As said above, PHP is serverside, while javascript is client-side.
client-side scripting, like javascript, is dependent on the clients browser. The client can turn off javascript to manipulate javascript pages, he can not do this for PHP pages.
The PHP page, will output what ever you program it to output!
eg. you can even make php dynamically create javascript (I dont know why you would want it to, though).
You can also make easy-to-use galleries, by modifying directory-listings, etc.
The ends of PHP are at your fingertips.
Olav Alexander Mjelde
Admin & Webmaster