/framework/experimental/mizithra/examples.php

http://zoop.googlecode.com/ · PHP · 31 lines · 27 code · 4 blank · 0 comment · 5 complexity · 4c2e4f45d15fdb5120c61df058b53d82 MD5 · raw file

  1. This file is just a list of examples of what we want to implement with zizithra. Later we should be able to move it to the examples directory for use there.
  2. ---------------------------------------
  3. <? for($i = 1; $i < 3; $i++): ?>
  4. <?/* This next tag should work even if short tags is not on, all tags should be compiled to full "<?php" tags *> */?>
  5. <?=$i?><br/>
  6. <? endfor; ?>
  7. <? $a = 3; ?>
  8. <? if($a == 3): ?>
  9. a = 3<br/>
  10. <? endif; ?>
  11. <? $array = array(1 => 'one', 2 => 'two', 3 => 'three') ?>
  12. <? foreach($array as $key => $vaL): ?>
  13. <?=$key?> =&lt; <?=$val?><br/>
  14. <? endforeach; ?>
  15. ---------------------------------------
  16. <?for $i = 1; $i < 3; $i++ ?>
  17. <?=$i?><br/>
  18. <?/for?>
  19. <? $a = 3; ?>
  20. <?if $a == 3 ?>
  21. a = 3<br/>
  22. <?/if?>
  23. <? $array = array(1 => 'one', 2 => 'two', 3 => 'three') ?>
  24. <?foreach $array as $key => $val ?>
  25. <?=$key?> =&lt; <?=$val?><br/>
  26. <?/foreach?>
  27. ---------------------------------------