instiki/vendor/plugins/erubis/examples/pi/example.ephp

18 lines
348 B
Text
Raw Normal View History

<?php
$user = "World";
$list = array('<aaa>', 'b&b', '"ccc"');
?>
<p>Hello @{$user}@!</p>
<table>
<tbody>
<?php $i = 0 ?>
<?php foreach ($list as $item) { ?>
<?php $i++; ?>
<tr bgcolor="@!{$i % 2 == 0 ? '#FFCCCC' : '#CCCCFF'}@">
<td>@!{$i}@</td>
<td>@{$item}@</td>
</tr>
<?php } ?>
</tbody>
</table>