PHP = server side. The client can NEVER run PHP directly in their browser (unless you have a Mozilla/PHP plugin but thats a different animal).
What you probably have a problem with is your HTML and/or JavaScript.
You'll probably want to make sure you have properly formed HTML tags (check out some of the site validators out there - they'll quickly let you know if you're site is up to par with coding standards).