本文整理汇总了PHP中ew_VarToJson函数的典型用法代码示例。如果您正苦于以下问题:PHP ew_VarToJson函数的具体用法?PHP ew_VarToJson怎么用?PHP ew_VarToJson使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ew_VarToJson函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ew_ArrayToJson
function ew_ArrayToJson($ar, $offset = 0)
{
$arOut = array();
$array = FALSE;
if (count($ar) > 0) {
$keys = array_keys($ar[0]);
foreach ($keys as $key) {
if (is_int($key)) {
$array = TRUE;
break;
}
}
}
foreach ($ar as $row) {
$arwrk = array();
foreach ($row as $key => $val) {
if ($array && is_string($key) || !$array && is_int($key)) {
continue;
}
$key = $array ? "" : "\"" . ew_JsEncode2($key) . "\":";
$arwrk[] = $key . ew_VarToJson($val);
}
if ($array) {
// Array
$arOut[] = "[" . implode(",", $arwrk) . "]";
} else {
// Object
$arOut[] = "{" . implode(",", $arwrk) . "}";
}
}
if ($offset > 0) {
$arOut = array_slice($arOut, $offset);
}
return "[" . implode(",", $arOut) . "]";
}
示例2: KeyToJson
function KeyToJson()
{
$json = "";
$json .= "CARD_TYPE_ID:" . ew_VarToJson($this->CARD_TYPE_ID->CurrentValue, "number", "'");
return "{" . $json . "}";
}
示例3: KeyToJson
function KeyToJson()
{
$json = "";
$json .= "UPLOAD_FILE_DETAIL_ID:" . ew_VarToJson($this->UPLOAD_FILE_DETAIL_ID->CurrentValue, "number", "'");
return "{" . $json . "}";
}
示例4: KeyToJson
function KeyToJson()
{
$json = "";
$json .= "vl_media_type_id:" . ew_VarToJson($this->vl_media_type_id->CurrentValue, "number", "'");
return "{" . $json . "}";
}
示例5: KeyToJson
function KeyToJson()
{
$json = "";
$json .= "package_id:" . ew_VarToJson($this->package_id->CurrentValue, "number", "'");
return "{" . $json . "}";
}
示例6: KeyToJson
function KeyToJson()
{
$json = "";
$json .= "CONCILIATION_ID:" . ew_VarToJson($this->CONCILIATION_ID->CurrentValue, "number", "'");
return "{" . $json . "}";
}
示例7: KeyToJson
function KeyToJson()
{
$json = "";
$json .= "RESERVATION_STATUS_ID:" . ew_VarToJson($this->RESERVATION_STATUS_ID->CurrentValue, "number", "'");
return "{" . $json . "}";
}
示例8: KeyToJson
function KeyToJson()
{
$json = "";
$json .= "BANK_ACCOUNT_ID:" . ew_VarToJson($this->BANK_ACCOUNT_ID->CurrentValue, "number", "'");
return "{" . $json . "}";
}
示例9: KeyToJson
function KeyToJson()
{
$json = "";
$json .= "TRANSFERENCE_ID:" . ew_VarToJson($this->TRANSFERENCE_ID->CurrentValue, "number", "'");
return "{" . $json . "}";
}
示例10: KeyToJson
function KeyToJson()
{
$json = "";
$json .= "USER_LEVEL_ID:" . ew_VarToJson($this->USER_LEVEL_ID->CurrentValue, "number", "'");
return "{" . $json . "}";
}
示例11: KeyToJson
function KeyToJson()
{
$json = "";
$json .= "PASSANGER_ID:" . ew_VarToJson($this->PASSANGER_ID->CurrentValue, "number", "'");
return "{" . $json . "}";
}
示例12: KeyToJson
function KeyToJson()
{
$json = "";
$json .= "TABLE_NAME:" . ew_VarToJson($this->TABLE_NAME->CurrentValue, "string", "'");
$json .= ",USER_LEVEL_ID:" . ew_VarToJson($this->USER_LEVEL_ID->CurrentValue, "number", "'");
return "{" . $json . "}";
}