dude.. try to check the address bar..
does it shows "http://127.0.0.1/yourscript.php"
if not, ur probably not running it from ur htdocs, or root folder.
Which means, u are probably running it locally, not thru the server.
if u did install php and apache right (or any webserver...)
go to your root document,
(if ur using apache.. it's probably in C:\Program Files\Apache Group\Apache\htdocs)
then open up ur php editor..
type in this
<?PHP
echo "I can read this";
?>
if you can read that.. than ur php is fine...
about the code being displayed in the webpage..
ur probably not closing ur php script with a <?
(maybe a copy+paste error)
hope that helps..
-jassh