Machine Guy Machine Guy - 5 months ago 32
PHP Question

show php variable in html heading

i want to print a php variable in the html h1 tag. Important thing to know is that html is defined within the php as follow:


$test=" <html>

<h1><?php echo (rand(10,1000000)); ?></h1>

</html> ";
echo $test;


Answer Source

use the following

  $prints =" <html>
               <h1> $a</h1>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download