You can find many examples of how to access array elements under PHP: Array - Array do's and don'ts.
$arr = array('foo'=>1234, 'bar'=>array('baz'=>'abcdef'));
// simply no quotes within double-quoted string literals
echo "foo: $arr[foo]\n";
// echo "foo: $arr[bar][baz]\n"; <- doesn't work as intended
// curly-braces -> same syntax as outside of a string literal
echo "foo: {$arr['foo']}\n";
echo "foo: {$arr['bar']['baz']}\n";
// string concatenation
echo "foo: ". $arr['foo'] ."\n";
echo "foo: ". $arr['bar']['baz'] ."\n";
// printf with placeholder in format string
printf("foo: %s\n", $arr['foo']);
printf("foo: %s\n", $arr['bar']['baz']);
// same as printf but it returns the string instead of printing it
$x = sprintf("foo: %s\n", $arr['foo']);
echo $x;
$x = sprintf("foo: %s\n", $arr['bar']['baz']);
echo $x;