Simple PHP Example with Source Code

Simple PHP Example with Source Code






Note- A PHP script can be placed anywhere in the document.

Note- A PHP script starts with <?php and ends with ?>:

<?php  Some PHP Code  ?>


Source Code

<!DOCTYPE html>

<html>

<body>

<?php
echo "My first PHP script!";
?> 

</body>

</html>



Output


My first PHP script!



Simple PHP Example with Source Code

Next Post Previous Post