note 27067 added to ref.xml
| From: | wiart at yahoo dot com | Date: | Thu, 21 Nov 2002 18:22:21 +0000 |
| Subject: | note 27067 added to ref.xml | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39828@lists.php.net to get a copy of this message | ||
I noted a little problem with empty elements:
when you have an empty element with attributes like:
<ref_to_sequence sequence_ref="S1_1" sequence_bank_ref="S1" />
the classical "each" construction for the attributes:
while (list($k, $v) = each($attribs)) {
print " <font color=\"#009900\">$k</font>=\"<font
color=\"#990000\">$v</font>\"";
}
does not work !!!??
you must use :
foreach ($attrs as $k => $v) {
print " <font color=\"#009900\">$k</font>=\"<font
color=\"#990000\">$v</font>\"";
}
I just experimented this with PHP 4.1.2 but did not try with more recent versions ...
If anyone can explain this to me ... don't hesitate to send to me an e-mail !
--
http://www.php.net/manual/en/ref.xml.php
http://master.php.net/manage/user-notes.php?action=edit+27067
http://master.php.net/manage/user-notes.php?action=delete+27067
http://master.php.net/manage/user-notes.php?action=reject+27067