This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
uphp:functions:sizeof [2017/03/28 15:37] jeff created |
uphp:functions:sizeof [2017/04/04 14:21] jeff |
||
---|---|---|---|
Line 1: | Line 1: | ||
======sizeof====== | ======sizeof====== | ||
+ | |||
< | < | ||
- | Return the number of elements in an array | + | Return the number of elements in an < |
====Description==== | ====Description==== | ||
- | <well size=" | + | |
- | <span style=" | + | <well size=" |
+ | <span style=" | ||
< | < | ||
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
</ | </ | ||
====Parameter==== | ====Parameter==== | ||
- | < | + | |
+ | <html><b>< | ||
====Return Value==== | ====Return Value==== | ||
- | Number of elements in the array | + | |
+ | Number of elements in the < | ||
====Examples==== | ====Examples==== | ||
Line 60: | Line 64: | ||
Multidimensional arrays are not counted recursively, | Multidimensional arrays are not counted recursively, | ||
- | 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()]]. | + | 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 < |
====See Also==== | ====See Also==== | ||
- | [[array()]] - Create an array with values | ||
- | [[array_key()]] - Return the key for an array index | + | [[array()]] - Create an < |
+ | |||
+ | [[array_key()]] - Return the key for an < | ||
- | [[array_keys()]] - Return keys for an array that has key/value pairs | + | [[array_keys()]] - Return keys for an < |
- | [[explode()]] - Turn a string into an array | + | [[explode()]] - Turn a < |
- | [[implode()]] - Turn an array into a string | + | [[implode()]] - Turn an < |
- | [[indexed_array()]] - Create an array of a specific type and size | + | [[indexed_array()]] - Create an < |
- | [[is_array()]] - Return 1 if the variable is an array | + | [[is_array()]] - Return 1 if the variable is an < |
- | [[json_encode()]] - Encode | + | [[json_encode()]] - JSON encode |
- | [[print_r()]] - Dump the contents of an array to the current output | + | [[print_r()]] - Dump the contents of an < |
[[uphp: | [[uphp: | ||