note 27067 deleted from ref.xml by nicos
| From: | nicos@php.net | Date: | Sun, 04 May 2003 18:02:34 +0000 |
| Subject: | note 27067 deleted from ref.xml by nicos | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-47508@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 !