cvs: pear /HTML_Table/Table Storage.php

From: Date: Fri, 21 Oct 2005 07:59:09 +0000
Subject: cvs: pear /HTML_Table/Table Storage.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35754@lists.php.net to get a copy of this message
wiesemann Fri Oct 21 03:59:09 2005 EDT Modified files: /pear/HTML_Table/Table Storage.php Log: Request #4988: addRow() accepts now array keys as column numbers http://cvs.php.net/diff.php/pear/HTML_Table/Table/Storage.php?r1=1.2&r2=1.3&ty=u Index: pear/HTML_Table/Table/Storage.php diff -u pear/HTML_Table/Table/Storage.php:1.2 pear/HTML_Table/Table/Storage.php:1.3 --- pear/HTML_Table/Table/Storage.php:1.2 Fri Sep 9 09:06:04 2005 +++ pear/HTML_Table/Table/Storage.php Fri Oct 21 03:59:04 2005 @@ -22,7 +22,7 @@ * @author Bertrand Mansion <bmansion@mamasam.com> * @copyright 2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Storage.php,v 1.2 2005/09/09 13:06:04 dufuz Exp $ + * @version CVS: $Id: Storage.php,v 1.3 2005/10/21 07:59:04 wiesemann Exp $ * @link http://pear.php.net/package/HTML_Table */ @@ -420,12 +420,11 @@ $type = strtolower($type); $row = $this->_rows++; - $contentCount = count($contents); - for ($counter = 0; $counter < $contentCount; $counter++) { + foreach ($contents as $col => $content) { if ($type == 'td') { - $this->setCellContents($row, $counter, $contents[$counter]); + $this->setCellContents($row, $col, $content); } elseif ($type == 'th') { - $this->setHeaderContents($row, $counter, $contents[$counter]); + $this->setHeaderContents($row, $col, $content); } } $this->setRowAttributes($row, $attributes, $inTR);

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