Answers for "php generate html"

PHP
1

load php in html

//Safe as:
index.html
number.php

//HTML:
<html>
   <head>
      <title>Home</title>
   </head>
   <body>
      <h1>Phone Number</h1>
      <?php include('number.php') ?>
   </body>
</html>

//PHP:
<?php
   echo 4895553268;
?>
Posted by: Guest on October-30-2020
2

set php var to html

<?php ob_start();?>
<div>Contents goes <b>here</b></div>
<?php $contents=ob_get_clean();?>
Posted by: Guest on December-17-2020

Browse Popular Code Answers by Language