Last active
August 29, 2015 13:57
Revisions
-
davist11 revised this gist
Mar 13, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ <?php public function in_array() { $haystack = $this->EE->TMPL->fetch_param('haystack', NULL); -
davist11 created this gist
Mar 13, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ public function in_array() { $haystack = $this->EE->TMPL->fetch_param('haystack', NULL); $needle = $this->EE->TMPL->fetch_param('needle', NULL); if ($haystack === NULL || $needle === NULL) { return; } $haystack = explode('|', $haystack); return in_array($needle, $haystack); }