Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Template;
- include('template/element.php');
- include('template/html.php');
- $articles = array(
- array('title' => 'Foo', 'content' => 'Yeeehaawww'),
- array('title' => 'Bar', 'content' => 'Cheers!')
- );
- echo Html::init()
- ->head()
- ->title('Cool Page')
- ->end()
- ->body()
- ->h1('Awesome Heading')
- ->h2('Sub Heading!')
- ->div()->id('main_content')
- ->p()
- ->classes('fancy', 'rainbow-unicorns')
- ->text('Wooooo!')
- ->end()
- ->each($articles, function($e, $article) {
- $e->h3($article['title']);
- $e->p($article['content']);
- })
- ->end()
- ->end()
- ->make();
Add Comment
Please, Sign In to add comment