JSON結構可以使用以下程式碼建立 −
$json = json_encode(array( "client" => array( "build" => "1.0", "name" => "xxxx", "version" => "1.0" ), "protocolVersion" => 4, "data" => array( "distributorId" => "xxxx", "distributorPin" => "xxxx", "locale" => "en-US" ) ));
以上是在PHP中建立巢狀的JSON物件如何實現?的詳細內容。更多資訊請關注PHP中文網其他相關文章!