Because all the PHP is executed on the server before it is sent to your browser. therefore, all your browser ever receives is the results of the PHP. For this same reason, you cannot go to a .php file on the web, save it, and expect to see how it works. You are only saving the page produced by the PHP, and not the PHP itself.
Here is an example:
<?php Echo "My PHP Page"; ?>
We can see that the PHP code is echoing the line My PHP Page, however, it is the server that reads this code and then knows to send My PHP Page to your browser. Since the rest of the code is just instructions for the server, it doesn't send anything else. So a view source or a save will simply be the text My PHP Page.








