Answer the question
In order to leave comments, you need to log in
[[+content_image]]
json encoding and decoding back?
I encode to JSON ( json_encode([["command" => "knopki", "knopki" => "gor_1"], "test", "white"]) ), output: [{"command":"knopki", "knopki":"gor_1"},"test","white"], then I decode what came out (as if the answer is from the database) - ( json_decode('[{"command":"knopki","knopki": "gor_1"},"test","white"]') ), outputs: Array
(
[0] => stdClass Object
(
[command] => knopki
[knopki] => gor_1
)
[1] => test
[2 ] => white
) )
how to make the last output output what was at the very beginning( [["command" => "knopki", "knopki" => "gor_1"], "test", "white"] )?
Answer the question
In order to leave comments, you need to log in
json_decode('[{"command":"knopki","knopki":"gor_1"},"test","white"]', true);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question