PageRenderTime 51ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/SpeedPHP/Drivers/TemplateLite/plugins/function.in_array.php

http://speedcms.googlecode.com/
PHP | 21 lines | 13 code | 1 blank | 7 comment | 2 complexity | b11188d20acff8fdb6825002d909d915 MD5 | raw file
  1. <?php
  2. /**
  3. * template_lite in_array plugin
  4. *
  5. * Type: function
  6. * Name: in_array
  7. * Purpose: Checks to see if there is an item in the array that matches and returns the returnvalue if true.
  8. */
  9. function tpl_function_in_array($params, &$tpl)
  10. {
  11. extract($params);
  12. if (is_array($array))
  13. {
  14. if (in_array($match, $array))
  15. {
  16. return $returnvalue;
  17. }
  18. }
  19. }
  20. ?>