-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
37 lines (32 loc) · 742 Bytes
/
test.php
File metadata and controls
37 lines (32 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/* ruby version:
require 'markaby'
mab = Markaby::Builder.new
mab.html do
head { title "Boats.com" }
body do
h1 "Boats.com has great deals"
ul do
li "$49 for a canoe"
li "$39 for a raft"
li "$29 for a huge boot that floats and can fit 5 people"
end
end
end
puts mab.to_s
*/
require 'Builder.php';
use \Markaby\TagBuilder as T;
$m = new \Markaby\Builder();
$m->head(['title' => "Boats.com"])
->html5(function(){
return T::body(function(){
return T::h1("Boats.com has great deals").
T::ul(function(){
return T::li("$49 for a canoe").
T::li("$39 for a raft").
T::li("$29 for a huge boot that floats and can fit 5 people");
});
});
});
echo $m;