most likely PHP isn't processing you pages and your browser thinks it's a text file. If you open the page and it just says:
<?php
phpinfo();
?>
then you have to edit your httpd.conf file.
make sure that these lines are in there and not commented out:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
also make sure that you change this:
AddType application/x-httpd-php
to this:
AddType application/x-httpd-php .php .php3
then restart apache.
if it still doesn't work, you may have forgotten to configure php with apache (and mysql if you want to do that)
./configure --with-mysql=/path/to/mysql -- --with-apache=/path/to/apache --enable-track-vars