Table of Contents

    Using Echo in PHP: Outputting Content to the Web

    Using Echo in PHP: Outputting Content to the Web

    Here we write very simple code by using only echo command and PHP file save with .php extension.

    Syntax

    
    <!DOCTYPE>
    <html>
    <body>
    <?php
    echo "<h2 id="article-heading-1">My First PHP Code</h2>";
    ?>
    </body>
    </html>
    
    

    Output

    
    
    My First PHP Code