This question already has an answer here:
I have an array that looks like this:
Array (
[0] =>
Array (
[id] => 3434
[label] => some test label
)
)
I need to get the ids and the labels from this array. so i tried this:
foreach($results['id'] as $result) {
echo $result['label'], '<br>';
}
but this doesn't do anything and it gives me this error:
PHP Notice: Undefined index: id in
Could someone please advice on this issue?
Thanks in advance.
</div>