Join Up!
104886 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previouscompactcurrentnext
Last updated: Tue, 29 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | Finnish | German

count

(PHP 3, PHP 4 )

count -- Cuenta los elementos de una variable

Descripción

int count ( mixed var)

Devuelve el número de elementos en var, que típicamente es una matriz (porque cualquier otra cosa tendría sólo un elemento).

Devuele 1 si la variable no es una matriz.

Devuelve 0 si la variable no tiene valor.

Aviso

count() puede devolver 0 para una variable sin valor, pero también puede devolver 0 para una variable ya inicializada pero con una matriz vacía. Utilice isset() para comprobar si una variable está inicializada.

Vea también: sizeof(), isset(), y is_array().

User Contributed Notes
count
add a note about notes
There are no user contributed notes for this page.
previouscompactcurrentnext
Last updated: Tue, 29 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST