$customFieldName
を配列に変換しようとしていますが、文字列として戻します。私は、次のことを試してみました:Get_post_meta配列への文字列配列
1、私は戻って取得文字列は次のようになります
$field = array();
$field = unserialize(get_post_meta((int)$id[0], $customFieldName, true));
を試してみてください
$field = array();
$field = get_post_meta((int)$id[0], $customFieldName, true);
2を試してみてください:\ {」
"use_own_api \":偽、\ "google_auth_code \":\ "4 \/hLXqq9X7sX1sOY \ "google_client_secret \":\ "svfsd \"、\ "google_client_id \":\ "180054848980.apps.googleusercontent.com \"、\ " \\ "token_type \\":\\ "bearer \\"、\\ "bearer \\"、\\ "google_access_token \":\\ "access_token \\":\\ "ya29.Ci8YA6-sfsd-asdfas \\" "expires_in \\":3600、\\ "refresh_token \\":\\ "1 \/534ewsdcy \\"、\\ "created \\":1467867036} \ "、\" ga_active_web_property \ ":\\ PHP_Incomplete_Class_Name : "" Google_WebpropertyChildLink \ "、\" href \ ":\" https:\ ":\" Google_Webproperty \ "、\" accountId \ ":\" 7489234 \ "、\" childLink \ ":\" PHP_Incomplete_Class_Name \ \/\/analytics \/v3 \/management \/accounts \/7489234 \/webproperties \/UA-7489234-1 \/profiles \ "、\" type \ ":\" analytics# \ "created \":\ "2016-06-28T19:38:17.530Z \"、\ "id \":\ "UA-7489234-1 \"、\ "industryVertical \":\ " "" \ "種類\":\ "アナリティクス#ウェブプロパティ\"、\ "レベル\":\ ""
しかし、まだ私はそれを文字列として返します。
アレイをarray
に戻す方法を教えてください。
返信いただきありがとうございます。
これを試してみましたか? $ jArr = json_decode($ jsonString、true); –