note 29525 added to function.count
| From: | nussocwxd at hotmail dot com | Date: | Sun, 16 Feb 2003 15:22:02 +0000 |
| Subject: | note 29525 added to function.count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44054@lists.php.net to get a copy of this message | ||
<?
$tt[] = 1; $tt[] = 3;
$transction[] = $tt;
$bb[] = 99;
$bb[] = 99;
$bb[] = 99;
$transction[] = $bb;
for ($ii=0;$ii<count($transction);$ii++)
{
echo "this transaction's count:".count($transaction[$ii])."< /br
>";
for ($jj=0;$jj<count($transction[$ii]);$jj++)
{
echo $transction[$ii][$jj].",";
}
echo "< /br >";
}
?>
the output is:
---------------------------
this transaction's count:0
1,3,
this transaction's count:0
99,99,99,
-----------------------------
but I think it should be
--------------------------------
this transaction's count:2
1,3,
this transaction's count:3
99,99,99,
---------------------------------
why £¿£¿£¿£¿
--
http://www.php.net/manual/en/function.count.php
http://master.php.net/manage/user-notes.php?action=edit+29525
http://master.php.net/manage/user-notes.php?action=delete+29525
http://master.php.net/manage/user-notes.php?action=reject+29525