/ecerp/Apps/Libraries/smartyplugin/function.split.php
PHP | 17 lines | 12 code | 2 blank | 3 comment | 3 complexity | 68c9b0b7822930f3c7b8b320c1b5b7e2 MD5 | raw file
- <?php
- /*
- split a array
- */
- function smarty_function_split($params, &$smarty){
- extract($params);
- foreach ($arr as $k => $v) {
- if($key == '') {
- $d_arr[] = $v;
- } else {
- $d_arr[] = $v[$key];
- }
- }
- return implode($sep, $d_arr);
- }