I am using Doctrine (DQL) with ZF2 to perform the following query:
$qb->select('a.schoolID, a.schoolName')
->from('College\Entity\School', 'a');
$schools=$qb->getQuery()->getResult();
This returns and array of objects or a two dimensial Array as such:
array (size=2)
0 =>
array (size=2)
'schoolID' => int 1
'schoolName' => string 'Alabama A & M University' (length=24)
1 =>
array (size=2)
'schoolID' => int 2
'schoolName' => string 'University of Alabama at Birmingham'
My question is: How and What's the best approach to access an Array of this type with unknown numbers of objects in it.