Update rsf.format.php

This commit is contained in:
Namhyeon Go 2019-05-26 02:04:29 +09:00 committed by GitHub
parent 686ce773f4
commit ca1e9e18cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,12 @@
if(!check_function_exists("get_rsf_encoded")) {
function get_rsf_encoded($data) {
return sprint("(%s)=>('%s')", array_keys($data), implode("','", $data));
$_ks = array();
$_vs = array();
foreach($data as $k=>$v) {
$_ks[] = $k;
$_vs[] = make_safe_argument($v);
}
return sprint("(%s)=>('%s')", implode(",", $_ks), implode("','", $_vs));
}
}