Created
April 8, 2022 17:37
-
-
Save estefanionsantos/133e6875862e23f57e33176ddaf9b35f to your computer and use it in GitHub Desktop.
main.php 02
This file contains hidden or 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 | |
use App\Helper\ViewHelper; | |
$view = new ViewHelper(); | |
$data['title'] = 'Home'; | |
$data['header'] = 'Lorem ipsum'; | |
$data['body'] = 'Some text here'; | |
$view->render('home', $data); | |
# source: src/view/home.php | |
/* | |
<html> | |
<head> | |
<title><?php echo $title; ?></title> | |
</head> | |
<body> | |
<h1><?php echo $header; ?></h1> | |
<?php echo $body; ?> | |
</body> | |
</html> | |
*/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment