json_decode( string $string, bool $assoc_array = false )
Contents
Parameters Parameters
- $string
-
(string) (Required)
- $assoc_array
-
(bool) (Optional)
Default value: false
Return Return
(object|array)
Source Source
File: wp-includes/compat.php
* * @since 3.9.2 * * @param string $a Expected string. * @param string $b Actual, user supplied, string. * @return bool Whether strings are equal. */ function hash_equals( $a, $b ) { $a_length = strlen( $a ); if ( strlen( $b ) !== $a_length ) { return false; } $result = 0;
Expand full source code Collapse full source code View on Trac
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
// Translate into an object
$obj = json_decode( $json );
// Translate into an array
$array = json_decode( $json, true );