Using Echo in PHP: Outputting Content to the Web

Rumman Ansari   Software Engineer   2024-07-09 10:02:10   5851  Share
Subject Syllabus DetailsSubject Details
☰ TContent
☰Fullscreen

Table of Content:

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>My First PHP Code</h2>";
?>
</body>
</html>


Output



My First PHP Code



Stay Ahead of the Curve! Check out these trending topics and sharpen your skills.