Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ## JSON : an object with attribute with key name and values as value
- $json = '
- {
- "key": "value",
- "key2": "value2"
- }
- ';
- $assoc = true;
- $result = json_decode ($json, $assoc);
- ?>
- ##$result (php code):
- <?php
- array (
- 'key' => 'value',
- 'key2' => 'value2',
- );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement