Question: For the same content below.

```
<html>
<body>
<?php  $name="jhon"; ?>
    <table>
        <tr>
            <td>name</td>
            <td><?php echo $name;?></td>
        </tr>
    </table>
</body>
</html>

```

1.To save it as test.php,the output in firefox is as below.

```
name    jhon

```

2.To save it as test.html,the output in firefox is as below.

```
name    

```

Why same content with different file type result in different output?

Answer: 
If you save with a `html` extension, your server won't preprocess it, so the PHP block won't be evaluated. That means, the second tag containing the actual name won't be created. 

An extension of `.php` tells the server to go through the file and run any containing PHP before sending the file to the client.
Your webserver (Apache etc) can identify and evaluate only .php files as per default configuration `AddType application/x-httpd-php .php` 

In order to execute any other scripts (say .html files) as PHP scripts you have to add AddType statement at your httpd.conf file like below (you have restart your webserver):

```
AddType application/x-httpd-php .html

```