My piece of code is:
$info = ldap_get_entries($ds, $sr);
for ($i=0; $i<$info["count"]; $i++) {
$dn=$info[$i]["dn"];
$cn=$info[$i]["cn"][0];
$mail=$info[$i]["mail"][0];
...
}
if for instance "mail" does not exit then I get an error. How can I make that if 'mail' attribute does not exit then execution breaks and skip to another piece or code that will add 'mail' attribute.
Sorry, but I'm new to php...
Thanks a lot for help