Created
July 10, 2011 15:08
-
-
Save sirkitree/1074603 to your computer and use it in GitHub Desktop.
Escaping from HTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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