Remove use of each() as it is deprecated
[squirrelmail.git] / templates / util_addressbook.php
index 1dd2e3fd97405d15d576dda78cb6d7bffcb63f12..df00167e0e7616e5b28d152ab2dfc156031d7012 100644 (file)
@@ -39,7 +39,7 @@ function formatAddressList ($addresses) {
         return array();
         
     $contacts = array();
-    while(list($undef,$row) = each($addresses)) {
+    foreach($addresses as $row) {
         $contact = array (
                             'FirstName'      => sm_encode_html_special_chars($row['firstname']),
                             'LastName'       => sm_encode_html_special_chars($row['lastname']),
@@ -150,7 +150,7 @@ function getBackends () {
     $backends = array();
     $backends['-1'] = _("All address books");
     $ret = $abook->get_backend_list();
-    while (list($undef,$v) = each($ret)) {
+    foreach ($ret as $v) {
         if ($v->btype == 'local' && !$v->listing) {
             continue;
         }