- print_r: documentation ( source)
<?php
$person = array(
'name' => 'John',
'age' => 24,
'locations' => Array
(
'Greenwhich' => Array
(
'New Eltham',
'Central Greenwhich'
),
'Feltham'
)
);
echo $person['locations']['Greenwhich'][2] = 'Outer Greenwich';
echo print_r($person, true);