You can try putting quotes around the file name when you save it ie. "myfile.php"
Your editing program may be saving it as myfile.php.txt if you do not use the quotes.
If the file name is okay, then you may need to change the default program that your php files are associated with.
Another thing to look at is whether php is installed and running on your machine. Your computer doesn't magically just know how to interpret php code