feat: convertTupleArrayToDict 유틸리티 함수 생성
This commit is contained in:
1 parent
12b3d1d607
commit
f06a4e532e
1 file changed
+9
@@ -306,6 +306,15 @@ class Util extends \utilphp\util
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function convertTupleArrayToDict($arr){
|
||||
$result = [];
|
||||
foreach($arr as $val){
|
||||
$key = array_shift($val);
|
||||
$result[$key] = $val;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function convertDictToArray($dict, bool $withKey=true)
|
||||
{
|
||||
$result = [];
|
||||
|
||||
Reference in new issue
Block a user