I do belive that if you read through this thread you would of seen this answeared befor.
as PHP is a server side srcipt, it needs to be run on a server inorder for it be interprated.
you can do this on your own computer, but you need to downlaod a server application. a program that will make you computer run as a web server.
for testing php on your own computer, i would get easyPHP this is a simple one hit install that gets a nice simple slim line server running on your computer. just do not erven think about using it as a proper web server, due to the fact that set up to be used as a test server. it has more or less no security for use as a proper web server.