Re: ldap

From: Date: Tue, 17 Jul 2001 17:40:31 +0000
Subject: Re: ldap
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58301@lists.php.net to get a copy of this message
Previously, Johan Vikerskog (ECS) said: > > How do i list the email for that entry? Ill get one answer from this, now > i want to print out the email adress for that entry. > How do i do that? > > $sr=ldap_search($ds, $dn, $filter, $justthese); > $info = ldap_get_entries($ds, $sr); > print $info["count"]." entries returned<p>"; This should do what you want; just stick it at the end of the code you already had in this email. for ($i = 0; $i < $info['count']; $i++) { print $info[$i]['mail'][0] . '<br>'; } That's assuming there is always only one value for "mail" in a given entry. -dan -- The main reason Santa is so jolly is because he knows where all the bad girls live. -George Carlin

« previous php.general (#58301) next »