======sizeof====== WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0 Return the number of elements in an array ====Description==== int sizeof ( array $array ) ====Parameter==== $array: Any array object ====Return Values==== Integer number of elements in the array ====Examples==== ====Notes==== Array indexes are 0-based, but the count of the number of elements in an array is 1-based. Furthermore, [[sizeof()]] may have no relationship at all to the index numbers, which can vary depending on how the array is defined (see the second example above where the 3rd element of $array2 is index number 10). This is the uPHP version of the PHP function ''sizeof()'' which is an alias of the function ''count()''. Multidimensional arrays are not counted recursively, i.e., each element which is an array adds '1' to the total count of elements (see above example). As can be seen from the examples, uPHP always returns 0 for objects which are not arrays (mainline PHP will return 1 in some cases). If you are not certain the object is an array it is best to first use function [[is_array()]]. ====See Also==== [[array()]] - Create an array, with optional values [[array_key()]] - Return the key for an array index [[array_keys()]] - Return keys for an array that has key/value pairs [[explode()]] - Turn a string into an array [[implode()]] - Turn an array into a string [[indexed_array()]] - Create an array of a specific type and size [[is_array()]] - Check if a variable is an array [[json_encode()]] - JSON encode an array into a string, with optional method [[print_r()]] - Dump the contents of an array to the current output [[uphp:variables|uPHP Variable Types and Limits]]