| Posted by Jerry Stuckle on 09/15/06 14:11 
iulian.ilea wrote:> Hi,
 >
 > How can I count how many variables are in an array. I give an example
 > to make my self clear enough:
 > $arr[0]="fds";
 > $arr[1]="fdfs";
 > $arr[2]=null;
 > $arr[3]="213";
 >
 > count($arr) will return 3. I searched on php.net and I couldn't find a
 > function that return 4 (in this example).
 >
 
 $arr = array();
 $arr[0]="fds";
 $arr[1]="fdfs";
 $arr[2]=null;
 $arr[3]="213";
 echo count($arr);  // Returns 4 on my system
 
 --
 ==================
 Remove the "x" from my email address
 Jerry Stuckle
 JDS Computer Training Corp.
 jstucklex@attglobal.net
 ==================
 [Back to original message] |