FAQ
<php
  function CountArray($arr){
      $i=0;
     foreach($arr as $val){
       $i++;
     }
        return $i;
  }

$arr=array(1,2,3,4,5,6,7,8,9);
echo CountArray($arr); // output 9
?>
----
Server IP: 59.162.86.123
Probable Submitter: 123.201.135.77
----
Manual Page -- http://php.net/manual/en/function.count.php
Edit -- https://master.php.net/note/edit/112180
Del: integrated -- https://master.php.net/note/delete/112180/integrated
Del: useless -- https://master.php.net/note/delete/112180/useless
Del: bad code -- https://master.php.net/note/delete/112180/bad+code
Del: spam -- https://master.php.net/note/delete/112180/spam
Del: non-english -- https://master.php.net/note/delete/112180/non-english
Del: in docs -- https://master.php.net/note/delete/112180/in+docs
Del: other reasons-- https://master.php.net/note/delete/112180
Reject -- https://master.php.net/note/reject/112180
Search -- https://master.php.net/manage/user-notes.php

Search Discussions

  • Aharvey at May 24, 2013 at 6:02 pm
    Note Submitter: vivekanand dot pathak25@gmail.com

    ----

    <php
      function CountArray($arr){
          $i=0;
         foreach($arr as $val){
           $i++;
         }
            return $i;
      }

    $arr=array(1,2,3,4,5,6,7,8,9);
    echo CountArray($arr); // output 9
    ?>

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-notes @
categoriesphp
postedMay 14, '13 at 12:56p
activeMay 24, '13 at 6:02p
posts2
users2
websitephp.net

2 users in discussion

Vivekanand Pathak25: 1 post Aharvey: 1 post

People

Translate

site design / logo © 2019 Grokbase