Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のような配列を取得するにはどうすればよいですか。
$array = array( "test1" => "blah1", "test2" => "blah2", );
次のような文字列に変換されます。
$string = {"test1":"blah1","test2":"blah"}
配列はサイズが異なる場合があるため、動的にする必要があります。
ありがとうございます。
これはJSONです。を使用しjson_encode()ます。
json_encode()