note 82391 added to ref.array
| From: | FahadSadah at osu1 dot php dot net | Date: | Wed, 09 Apr 2008 08:54:42 +0000 |
| Subject: | note 82391 added to ref.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-138046@lists.php.net to get a copy of this message | ||
Simple function to find number of elements in an array (equivalent to ubound in Visual Basic)
<?php
function get_elements($array) {
$count = 0;
foreach ($foo as $array) {
$count++;
}
return $count;
}
?>
----
Server IP: 87.124.64.96
Probable Submitter: 84.9.49.124
----
Manual Page -- http://www.php.net/manual/en/ref.array.php
Edit -- https://master.php.net/note/edit/82391
Del: integrated -- https://master.php.net/note/delete/82391/integrated
Del: useless -- https://master.php.net/note/delete/82391/useless
Del: bad code -- https://master.php.net/note/delete/82391/bad+code
Del: spam -- https://master.php.net/note/delete/82391/spam
Del: non-english -- https://master.php.net/note/delete/82391/non-english
Del: in docs -- https://master.php.net/note/delete/82391/in+docs
Del: other reasons-- https://master.php.net/note/delete/82391
Reject -- https://master.php.net/note/reject/82391
Search -- https://master.php.net/manage/user-notes.php