Search for in the Packages This site (using Yahoo!) Developers Developer mailing list General mailing list CVS commits mailing list
Usage ({else:})
Usage
adds an else statement in PHP so that blocks of conditional HTML are shown correctly.
Przykład 43-1. Setting variables for if
class example { function output() { $this->showStuff = false; ......... $template->outputObject($this); } }
Przykład 43-2. Else in template
{if:showStuff}Hello{else:}World{end:}
Przykład 43-3. Compiled template
<?php if ($t->showStuff) { ?>Hello<?php } else { ?>World<<?php } ?>
Przykład 43-4. The output
World