<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Return first attribute</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ldap-explode-dn.html">ldap_explode_dn</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ldap-first-entry.html">ldap_first_entry</a></div> <div class="up"><a href="ref.ldap.html">LDAP Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.ldap-first-attribute" class="refentry"> <div class="refnamediv"> <h1 class="refname">ldap_first_attribute</h1> <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">ldap_first_attribute</span> — <span class="dc-title">Return first attribute</span></p> </div> <div class="refsect1 description" id="refsect1-function.ldap-first-attribute-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">string</span> <span class="methodname"><strong>ldap_first_attribute</strong></span> ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$link_identifier</code></span> , <span class="methodparam"><span class="type">resource</span> <code class="parameter">$result_entry_identifier</code></span> )</div> <p class="para rdfs-comment"> Gets the first attribute in the given entry. Remaining attributes are retrieved by calling <span class="function"><a href="function.ldap-next-attribute.html" class="function">ldap_next_attribute()</a></span> successively. </p> <p class="para"> Similar to reading entries, attributes are also read one by one from a particular entry. </p> </div> <div class="refsect1 parameters" id="refsect1-function.ldap-first-attribute-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">link_identifier</code></em></span> <dd> <p class="para"> An LDAP link identifier, returned by <span class="function"><a href="function.ldap-connect.html" class="function">ldap_connect()</a></span>. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">result_entry_identifier</code></em></span> <dd> <p class="para"> </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">ber_identifier</code></em></span> <dd> <p class="para"> <em><code class="parameter">ber_identifier</code></em> is the identifier to internal memory location pointer. It is passed by reference. The same <em><code class="parameter">ber_identifier</code></em> is passed to <span class="function"><a href="function.ldap-next-attribute.html" class="function">ldap_next_attribute()</a></span> , which modifies that pointer. </p> <blockquote class="note"><p><strong class="note">Note</strong>: <p class="para"> This parameter is no longer used as this is now handled automatically by PHP. For backwards compatibility PHP will not throw an error if this parameter is passed. </p> </p></blockquote> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.ldap-first-attribute-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns the first attribute in the entry on success and <strong><code>FALSE</code></strong> on error. </p> </div> <div class="refsect1 changelog" id="refsect1-function.ldap-first-attribute-changelog"> <h3 class="title">Changelog</h3> <p class="para"> <table class="doctable informaltable"> <thead> <tr> <th>Version</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>5.2.4</td> <td> The <em><code class="parameter">ber_identifier</code></em> was removed. This is now handled automatically by PHP. </td> </tr> </tbody> </table> </p> </div> <div class="refsect1 seealso" id="refsect1-function.ldap-first-attribute-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.ldap-next-attribute.html" class="function" rel="rdfs-seeAlso">ldap_next_attribute()</a> - Get the next attribute in result</span></li> <li class="member"> <span class="function"><a href="function.ldap-get-attributes.html" class="function" rel="rdfs-seeAlso">ldap_get_attributes()</a> - Get attributes from a search result entry</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ldap-explode-dn.html">ldap_explode_dn</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ldap-first-entry.html">ldap_first_entry</a></div> <div class="up"><a href="ref.ldap.html">LDAP Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>