当前位置: 首页>>代码示例>>PHP>>正文


PHP ew_VarToJson函数代码示例

本文整理汇总了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) . "]";
}
开发者ID:NoSympathy,项目名称:Dashboard,代码行数:35,代码来源:ewshared12.php

示例2: KeyToJson

 function KeyToJson()
 {
     $json = "";
     $json .= "CARD_TYPE_ID:" . ew_VarToJson($this->CARD_TYPE_ID->CurrentValue, "number", "'");
     return "{" . $json . "}";
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:6,代码来源:card_typeinfo.php

示例3: KeyToJson

 function KeyToJson()
 {
     $json = "";
     $json .= "UPLOAD_FILE_DETAIL_ID:" . ew_VarToJson($this->UPLOAD_FILE_DETAIL_ID->CurrentValue, "number", "'");
     return "{" . $json . "}";
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:6,代码来源:upload_file_detailinfo.php

示例4: KeyToJson

 function KeyToJson()
 {
     $json = "";
     $json .= "vl_media_type_id:" . ew_VarToJson($this->vl_media_type_id->CurrentValue, "number", "'");
     return "{" . $json . "}";
 }
开发者ID:cahilbey,项目名称:VL-AWS-Test,代码行数:6,代码来源:vl_media_type_listinfo.php

示例5: KeyToJson

 function KeyToJson()
 {
     $json = "";
     $json .= "package_id:" . ew_VarToJson($this->package_id->CurrentValue, "number", "'");
     return "{" . $json . "}";
 }
开发者ID:ahmarmahmood,项目名称:tabedaar,代码行数:6,代码来源:packageinfo.php

示例6: KeyToJson

 function KeyToJson()
 {
     $json = "";
     $json .= "CONCILIATION_ID:" . ew_VarToJson($this->CONCILIATION_ID->CurrentValue, "number", "'");
     return "{" . $json . "}";
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:6,代码来源:conciliationinfo.php

示例7: KeyToJson

 function KeyToJson()
 {
     $json = "";
     $json .= "RESERVATION_STATUS_ID:" . ew_VarToJson($this->RESERVATION_STATUS_ID->CurrentValue, "number", "'");
     return "{" . $json . "}";
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:6,代码来源:reservation_statusinfo.php

示例8: KeyToJson

 function KeyToJson()
 {
     $json = "";
     $json .= "BANK_ACCOUNT_ID:" . ew_VarToJson($this->BANK_ACCOUNT_ID->CurrentValue, "number", "'");
     return "{" . $json . "}";
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:6,代码来源:bank_accountinfo.php

示例9: KeyToJson

 function KeyToJson()
 {
     $json = "";
     $json .= "TRANSFERENCE_ID:" . ew_VarToJson($this->TRANSFERENCE_ID->CurrentValue, "number", "'");
     return "{" . $json . "}";
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:6,代码来源:transferenceinfo.php

示例10: KeyToJson

 function KeyToJson()
 {
     $json = "";
     $json .= "USER_LEVEL_ID:" . ew_VarToJson($this->USER_LEVEL_ID->CurrentValue, "number", "'");
     return "{" . $json . "}";
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:6,代码来源:user_levelsinfo.php

示例11: KeyToJson

 function KeyToJson()
 {
     $json = "";
     $json .= "PASSANGER_ID:" . ew_VarToJson($this->PASSANGER_ID->CurrentValue, "number", "'");
     return "{" . $json . "}";
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:6,代码来源:passangerinfo.php

示例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 . "}";
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:7,代码来源:user_level_permissionsinfo.php


注:本文中的ew_VarToJson函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。