I have the following:
Array ( [0] => Array ( [0] => Array ( [value] => 150109 [format] => [safe_value] => 150109 ) ) )
I need to get the value "150109", but how on earth do I accomplish that?
Top level:
print_r($data);
// Output: Array ( [0] => Array ( [0] => Array ( [value] => 150109 [format] => [safe_value] => 150109 ) ) )
Outmost element:
print_r($data[0]);
// Output: Array ( [0] => Array ( [value] => 150109 [format] => [safe_value] => 150109 ) )
Next level:
print_r($data[0][0]);
// Output: Array ( [value] => 150109 [format] => [safe_value] => 150109 )
The final value
echo $data[0][0]['value'];
// Output: 150109
Accessing each layer of values this way makes it easier to figure out how to get to your desired value. After a while this becomes more obvious.
$data['und'][0]['value'].v under the up/down-votes to this question to mark it as the correct solution. Indicating that this answer helped you makes it easier for people who may have a similar problem in the future.
$data[0][0]["value"]or$data[0][0]["safe_value"]if the$datais your array