PageRenderTime 44ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/aoliz/core/include/smartyplugins/compiler.in_array.php

http://phpfor.googlecode.com/
PHP | 16 lines | 15 code | 1 blank | 0 comment | 2 complexity | 879bf8a68f7dafdc958b2e7a5784cf82 MD5 | raw file
  1. <?php
  2. function tpl_compiler_in_array($attrs, &$smarty)
  3. {
  4. $return=<<<EOF
  5. if (is_array({$attrs['array']}))
  6. {
  7. if (in_array({$attrs['match']}, {$attrs['array']}))
  8. {
  9. echo {$attrs['returnvalue']};
  10. }
  11. }
  12. EOF;
  13. return $return;
  14. }
  15. ?>