[ create a new paste ] login | about

Link: http://codepad.org/TppnMqco    [ raw code | output | fork ]

PHP, pasted on Jan 5:
1
2
3
4
5
6
7
<?php

$json = json_decode('{"book":[{"title":"Good day"}]}');

echo 'Title: ' . $json->book[0]->title, PHP_EOL;

print_r($json);


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
Title: Good day
stdClass Object
(
    [book] => Array
        (
            [0] => stdClass Object
                (
                    [title] => Good day
                )

        )

)


Create a new paste based on this one


Comments: