Embed PHP In HTML

using PHP tags <?php ?> we can Embed PHP in HTML

Example

<!DOCTYPE html>
<html>
<body>

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


</body>
</html>

Run Example>>

Embed HTML In PHP

using echo we can Embed HTML in PHP

Example

<?php
echo "<h1> My first PHP script!</h1>";
echo "<p> Welcome to PHP Referance Site!</p>";
?>

Run Example>>