Pages are generally stored on server side - not on the client side. It's about when code in that pages are run. The "chronology" of getting the page is like this:
- browser sends request to the server (when user clicked on some link or entered an url)
- the server gets the page browser requested from disk and looks for some scripts in it.
- when server finds php code, this code is now executed, producing some data to be sent to browser; to server it doesn't matter if it's html, javascript etc. it is sending (php can echo some javascript for example - php is executed, javascript is sent without any execution, as text).
- browser receives data from the server (the same data that was produced by php script).
- browser parses html into some nice layout; when it finds JavaScript is now executed (if it's enabled in the browser).
So you see that there are two stages: first happens on the server (server-side), then the output is sent to browser, where second stage is taking place (client-side). Therefore php is a server-side language, JavaScript is a client-side language.