how to interperse HTML with PHP

Problem

You want to intersperse HTML with PHP code.



Solution

Just getting back to basics, this is a very simple demo
of how to implement PHP code along with HTML.



Example


<html><head>....
<body>
<h1>Hello World</h1>
<?php if($_GET[runit]) { ?>
<b>This will get displayed if ?runit=yes is
appended to the web users request</b>

<?php } else { ?>

nothing to see here ... :)

<?php } ?>

<body><html>



Reference

[tags]Interperse HTML in PHP, PHP Coding School[/tags]



Leave a Reply

Your email address will not be published. Required fields are marked *