Skip to content

Instantly share code, notes, and snippets.

@sirkitree
Created July 10, 2011 15:08
Show Gist options
  • Save sirkitree/1074603 to your computer and use it in GitHub Desktop.
Save sirkitree/1074603 to your computer and use it in GitHub Desktop.
Escaping from HTML
<html>
<body>
<p>This is an example of escaping HTML and placing a little PHP in the mix!</p>
<?php print "<p>I'm being printed from PHP!!</p>"; ?>
<p>I can also get a little extra credit by using a little logic!</p>
<?php
// Set our variable.
$count = 0;
// Loop through our variable until it reaches 12.
while ($count < 12) {
// Print a statement with our variable.
print "<p>I see a pretty girl and now I'm $count inches tall!</p>";
// Increment our variable.
$count++;
}
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment