Right, so by the sounds of it you are running it off your own machine?
Firstly, do your php files start with <?php and end with ?> - if not this is probably the issue.
Secondly, have you configured apache correctly to deal with php? You need to do a few other things apart from just installing the components... specifically, whats your httpd.conf looking like? - you need to modify this to instruct apache to load the PHP module. For PHP 5 you will need to add something like
# Use for PHP 5.x:
LoadModule php5_module modules/libphp5.so
AddHandler php5-script php
# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php
AddType text/html php
Have a look at the PHP/Apache documentation or FAQ and it should detail in there exactly what you need