note 44578 added to function.sizeof
| From: | leekin at osu1 dot php dot net | Date: | Tue, 10 Aug 2004 04:29:18 +0000 |
| Subject: | note 44578 added to function.sizeof | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-74382@lists.php.net to get a copy of this message | ||
"sizeof -- Alias of count()"
sizeof is not a alias of count for multiple arrays.
if you have an array like this:
Array
(
[c_adi] => Samet
[c_soyadi] => Mutlu
[saat] => 13:00:00
[tarih] => 2004-09-21
)
both echo count($arr); echo sizeof($arr);
will out:
4
But if your arr variable looks like this:
Array
(
[0] => Array
(
[c_adi] => Samet
[c_soyadi] => Mutlu
[saat] => 13:00:00
[tarih] => 2004-09-21
)
[1] => Array
(
[c_adi] => durmuº
[c_soyadi] => Mutlu
[saat] => 13:00:00
[tarih] => 2004-09-21
)
)
echo count($arr); will out:
0
echo sizeof($arr); will out:
2
that's the difference between them.
----
Manual Page -- http://www.php.net/manual/en/function.sizeof.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44578
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44578&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44578&report=yes
Search -- http://master.php.net/manage/user-notes.php