I struggle to access specific item within my PHP array, which is created like this array('expected' => array('form', 'title'))
.Array
(
[expected] => Array
(
[0] => form
[1] => title
)
)
I would like to access the title of the first array (expected) as well as the value of the element within this array (form and title)
I tried methods such as array_values()or key but I never get the right results.
EDIT Thanks to Aamir, this problem is solved. In fact, it was because I pass the array as a parameter into a method and I set it to null by default. Yes I know, dumb stuff.