Update base.php

This commit is contained in:
Namhyeon Go 2018-03-23 18:24:05 +09:00 committed by GitHub
parent 5b235d644e
commit c20225c9e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,6 +84,20 @@ if(!function_exists('array_multikey_empty')) {
}
}
if(!function_exists("get_value_in_array")) {
function get_value_in_array($name, $arr=array(), $default=0) {
$output = 0;
if(is_array($arr)) {
$output = array_key_empty($name, $arr) ? $default : $arr[$name];
} else {
$output = $default;
}
return $output;
}
}
if(!function_exists("cut_str")) {
function cut_str($str, $start, $len=0) {
$cutted_str = "";