The first method is applying json_decode and json_encode functions. . A variable that counts the number of replacements, Returns a string or an array with the replaced values, If the string to be searched is an array, it returns an array, If the string to be searched is an array, find and replace is performed with every array element, If both find and replace are arrays, and replace has fewer elements than find, an empty string will be used as replace, If find is an array and replace is a string, the replace string will be used for every find value. The first function is capable of accepting JSON-encoded string and converting it into a PHP variable. There is also no benefit in creating objects, because json_encode() is going to be using the same syntax when the data is converted to a json string. It takes an array that contains key-value pairs and returns an array where they are actually the key and value. Numeric arrays translate into JSON lists ( [] ), associative arrays and PHP objects translate into objects ( {} ). array_keys() devuelve las claves, numricas y de tipo when the string representation is the same, the first element will be used. Required. search replace str_replace() subject replace search search replace search If an array is empty (but defined), or the $search_value is not found in the array, an empty array is returned (not false, null, or -1). we can convert json object to associative array in php using json_encode. Note: If two or more array elements have the same key, the last one overrides the others. Array keys can not be arrays themselves, nor streams, resources, etc. the first equal element will be retained. [Editor's note: For a complete solution to the printing of complex structures or hashes, see the PEAR::Var_Dump package: "