Answers for "how to require a php file in html"

PHP
1

how to link external php file to html

/*You need to change that .html file to .php file. In this way, 
you can easily link one php file to another.*/


<html>
<body>

<h1>Welcome to my home page!</h1>
<p>Some text.</p>
<p>Some more text.</p>
<?php include 'footer.php';?>

</body>
</html>
Posted by: Guest on June-30-2021
0

can i write php code in html file

<div>
  <?php echo "This is printed by PHP"; ?>
</div>

<div> 
	<?php $sum = 5+2; echo $sum; ?>
 </div>
Posted by: Guest on May-24-2021

Browse Popular Code Answers by Language