You are here: Re: counting an array « PHP Programming Language « IT news, forums, messages
Re: counting an array

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
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация