cvs: pear /HTML_QuickForm/QuickForm select.php

From: Date: Fri, 07 Jun 2002 19:32:57 +0000
Subject: cvs: pear /HTML_QuickForm/QuickForm select.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4486@lists.php.net to get a copy of this message
jrust Fri Jun 7 15:32:57 2002 EDT Modified files: /pear/HTML_QuickForm/QuickForm select.php Log: Changed while loops to foreach Index: pear/HTML_QuickForm/QuickForm/select.php diff -u pear/HTML_QuickForm/QuickForm/select.php:1.7 pear/HTML_QuickForm/QuickForm/select.php:1.8 --- pear/HTML_QuickForm/QuickForm/select.php:1.7 Wed Jun 5 14:40:14 2002 +++ pear/HTML_QuickForm/QuickForm/select.php Fri Jun 7 15:32:55 2002 @@ -17,7 +17,7 @@ // | Bertrand Mansion <bmansion@mamasam.com> | // +----------------------------------------------------------------------+ // -// $Id: select.php,v 1.7 2002/06/05 18:40:14 jrust Exp $ +// $Id: select.php,v 1.8 2002/06/07 19:32:55 jrust Exp $ require_once('DB.php'); require_once('HTML/QuickForm/element.php'); @@ -330,7 +330,7 @@ if (isset($values)) { $this->setSelected($values); } - while (list($key, $val) = each($arr)) { + foreach ($arr as $key => $val) { $this->addOption($key, $val); } return true; @@ -504,7 +504,7 @@ // Fix me : doesn't work for multiple. $value = ''; if (is_array($this->_values)) { - while (list($key,$val) = each($this->_values)) { + foreach ($this->_values as $key => $val) { for ($i=0; $i<count($this->_options); $i++) { $optionTxt = $this->_options[$i]["text"]; $optionVal = $this->_options[$i]["attr"]["value"];

« previous php.pear.cvs (#4486) next »