Php echo not working

when i put this in index.html:

    <h1>text</h1>
    <?php
    echo "<h1>Hello, world</h1>" ;
    ?>

this is the result:

text

Hello, world"; ?>


what is the problem?

Surely it would need to be index.php not .html

1 Like

now it worked

I thought php was inserted in html