28 lines
552 B
HTML
28 lines
552 B
HTML
|
<html>
|
||
|
<head>
|
||
|
<title>Twig Example</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<!-- Variable names put between {{ ... }} will turn into the value
|
||
|
when interpreted by the server. -->
|
||
|
|
||
|
<!-- If the variable "name" is set in the PHP code, then this will
|
||
|
print out that string: -->
|
||
|
<p>My name is {{ name }}</p>
|
||
|
|
||
|
|
||
|
<!-- List items can be read like {{ list[n] }} -->
|
||
|
<p>List of animals:</p>
|
||
|
<ul>
|
||
|
{{ animals[0] }}
|
||
|
{{ animals[1] }}
|
||
|
{{ animals[2] }}
|
||
|
{{ animals[3] }}
|
||
|
{{ animals[4] }}
|
||
|
</ul>
|
||
|
|
||
|
<!-- That should be all you need to know! -->
|
||
|
</body>
|
||
|
</html>
|