Pass Multidimensional PHP Array to JSON and JavaScript with json_encode

The example array is numerically indexed at the outer level with associative sub arrays.

To see the PHP, open this file in an editor. To see the resulting JavaScript, view the source code of this page using browser menu commands.

Back to Index