Last active
May 24, 2022 06:25
-
-
Save binarykore/fe83469201b5f01b365a6cf8931dd39b to your computer and use it in GitHub Desktop.
Array Brackets with JSON Pretty Printing method...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| Header("Content-Type:Application/JSON"); | |
| $_hash = [ | |
| "id" => "world" | |
| ]; | |
| $_data = [ | |
| "hello" => [ | |
| $_hash | |
| ] | |
| ]; | |
| print_r(json_encode($_data,JSON_PRETTY_PRINT)); | |
| echo("\r\n"); | |
| echo("\r\n"); | |
| echo($_data["hello"][0]["id"]); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment