$info = ldap_get_entries($ldap, $search);
for($i = 0; $i < count($info) - 1; $i++)
{
$people =
array(
$i => array(
'first' => $info[$i]['givenname'][0],
'middle' => $info[$i]['initials'][0],
'last' => $info[$i]['sn'][0],
'email' => $info[$i]['mail'][0],
'username' => $info[$i]['uid'][0]
)
);
}
I have the following code working, but what happens is that the last entry in $info is only entered into $people. What am I doing wrong?