Last active
August 29, 2015 14:02
-
-
Save Scriptor/4fdba96ab815db262c3c to your computer and use it in GitHub Desktop.
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> | |
<head> | |
<title><?php echo $title;?></title> | |
</head> | |
<body> | |
<?php include $sub_template; ?> | |
</body> | |
</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
<?php | |
$row = ...; // Imagine code to get a post row from the db here | |
$title = $row->title; | |
$body = $row->body; | |
$sub_template = 'post_template.php'; | |
include 'main_template.php'; | |
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
<div id='post'> | |
<h2><?php echo $title;?></h2> | |
<p><?php echo $body;?></p> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment