public function getEntries($search)
    {
        $entries = ldap_get_entries($this->connect, $search);

        array_walk_recursive($entries, function (&$item) {
            if (!mb_detect_encoding($item, 'utf-8', true)) {
                $item = utf8_encode($item);
            }
        });

        return $entries;
    }
public function getEntries($search)
    {
        $entries = ldap_get_entries($this->connect, $search);

        array_walk_recursive($entries, function (&$item) {
            if (!mb_detect_encoding($item, 'utf-8', true)) {
                $item = utf8_encode($item);
            }
        });

        return $entries;
    }
public function getEntries ( $ search ) { $ entries = ldap_get_entries ( $ this -> connect , $ search ) ; array_walk_recursive ( $ entries , function ( & $ item ) { if ( ! mb_detect_encoding ( $ item , 'utf-8' , true ) ) { $ item = utf8_encode ( $ item ) ; } } ) ; return $ entries ; }
This method reads the entries of a LDAP search.

@param search LDAP search result identifier

@return Returns a complete result information in a multi-dimensional array on success and FALSE on error
This method reads the entries of a LDAP search .