note 111714 added to function.count
| From: | vivekanand dot pathak25 at gmail dot com | Date: | Wed, 20 Mar 2013 12:41:49 +0000 |
| Subject: | note 111714 added to function.count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-194130@lists.php.net to get a copy of this message | ||
The method for count is :
<?php
function CountArray($arr=" "){
if($arr!=" "){
$i=0;
foreach($arr as $key){
$i+=$i;
}
}
return $i;
}
example :
$list=array(1,2,3,4,5,6,7,8,9);
$count=CountArray($list);
echo $count; // 9
----
Server IP: 69.147.83.199
Probable Submitter: 122.167.25.71
----
Manual Page -- http://php.net/manual/en/function.count.php
Edit -- https://master.php.net/note/edit/111714
Del: integrated -- https://master.php.net/note/delete/111714/integrated
Del: useless -- https://master.php.net/note/delete/111714/useless
Del: bad code -- https://master.php.net/note/delete/111714/bad+code
Del: spam -- https://master.php.net/note/delete/111714/spam
Del: non-english -- https://master.php.net/note/delete/111714/non-english
Del: in docs -- https://master.php.net/note/delete/111714/in+docs
Del: other reasons-- https://master.php.net/note/delete/111714
Reject -- https://master.php.net/note/reject/111714
Search -- https://master.php.net/manage/user-notes.php