Add php files
This commit is contained in:
14
include/Smarty/plugins/modifier.getrealindex.php
Normal file
14
include/Smarty/plugins/modifier.getrealindex.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
function smarty_modifier_getrealindex($array, $key) {
|
||||
if($key == null || empty($key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$a_keys = array_keys($array);
|
||||
$index_of_apple = array_search($key, $a_keys);
|
||||
|
||||
return $index_of_apple;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user