note 54151 added to function.ldap-get-entries

From: Date: Fri, 24 Jun 2005 21:27:03 +0000
Subject: note 54151 added to function.ldap-get-entries
Groups: php.notes 
Request: Send a blank email to php-notes+get-90924@lists.php.net to get a copy of this message
Another way of ignoring the last null entry would be to subtract one from the iteration count like this: for($i = 0; $i < count($result_array) - 1; $i++) { ... } Helmut's method is far more elegant on its own but what I do is combine the above with the null test that he suggested. It may seem like overkill, but better safe than sorry. ---- Manual Page -- http://www.php.net/manual/en/function.ldap-get-entries.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54151 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54151&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54151&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54151&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54151&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54151&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54151&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54151&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#90924) next »