First things first: is it doing this when viewing it through a browser, or when you try to open it on your computer?
If it's the latter, do what sgoku01 said. If it's the former, follow this procedure:
Open your httpd.conf, it'll be in a directory like this: {apache dir}conf/httpd.conf
Search for "AddType," and add this line:
AddType application/x-httpd-php .php
Restart Apache. It should work now.