Hi all,
I have came across the following question in a Zend Certification PHP mock exam tonight:
Given the following array
Which of the following print statements will output the string "correct"?PHP Code:<?php
$a = array(
1 => 'red',
'green',
'blue',
'purple' => array(
'house' => 'dog',
'food' => 'meal',
'here' => 'gone',
'hello' => array(
5 => 'goodbye',
8 => 'something',
'correct')));
?>
1. print $a['purple][4][3];
2. print $a['purple']['hello'][9];
3. print $a[2][4][3];
4. print $a[2][4][9];
5. print $a[4]['hello'][9];
Many thanks,
Picco


Reply With Quote

Bookmarks