User Tools

Site Tools


uphp:functions:array

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:array [2017/03/31 13:24]
jeff
uphp:functions:array [2021/09/13 05:57] (current)
Line 3: Line 3:
 <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
-Create an array, with optional values+Create an <html><b><span style="color:green">array<span style="color:black"></b></html>, with optional values
  
 ====Description==== ====Description====
  
-<well size="sm"><html><span style="font-size:125%;color:green">array +<well size="sm"><html> 
-<span style="color:black"></html>[[array]] +<span style="font-size:125%;color:green">array 
-<html>( [+<span style="color:black">array ( [
 <span style="color:green">mixed <span style="color:green">mixed
 <span style="color:blue">$value <span style="color:blue">$value
Line 17: Line 17:
 ====Parameters==== ====Parameters====
  
-<html><span style="color:blue"><b>$value</b><span style="color:black">(s)</html>:  Optional comma separated list of values of any type (string, int, float, array)+<html><b><span style="color:blue">$value<span style="color:black"></b>(s):  Optional comma separated list of values of any type (<b><span style="color:green">string<span style="color:black"></b><b><span style="color:green">int<span style="color:black"></b><b><span style="color:green">float<span style="color:black"></b><b><span style="color:green">array<span style="color:black"></b>)</html>
  
-====Return Value====+====Return Values====
  
-Arrayempty or with values as specified+<html><b><span style="color:green">Array<span style="color:black"></b></html>:  empty or with values as specified
  
 ====Examples==== ====Examples====
  
-**Creating Arrays:**+===Creating Arrays===
  
 <code php> <code php>
Line 40: Line 40:
 </code> </code>
  
-**Key/Value Pairs:**+===Key/Value Pairs===
  
 <code php> <code php>
Line 64: Line 64:
 ====Note==== ====Note====
  
-An [[indexed array]] is a more efficient way to store variables in memory if the size and data type is known beforehand. The [[array()]] function creates a hashed array, which consumes much more memory per element.+An [[indexed array]] is a more efficient way to store variables in memory if the size and data type is known beforehand. The [[array()]] function creates a hashed <html><b><span style="color:green">array<span style="color:black"></b></html>, which consumes much more memory per element.
  
 ====See Also==== ====See Also====
  
-[[indexed_array()]] - Create an array of a specific type and size+[[indexed_array()]] - Create an <html><b><span style="color:green">array<span style="color:black"></b></html> of a specific type and size
  
-[[sizeof()]] - Return the number of elements in an array+[[sizeof()]] - Return the number of elements in an <html><b><span style="color:green">array<span style="color:black"></b></html>
  
-[[print_r()]] - Dump the contents of an array to the current output+[[print_r()]] - Dump the contents of an <html><b><span style="color:green">array<span style="color:black"></b></html> to the current output
  
-[[array_key()]] - Return the key for an array index+[[array_key()]] - Return the key for an <html><b><span style="color:green">array<span style="color:black"></b></html> index
  
-[[array_keys()]] - Return keys for an array that has key/value pairs+[[array_keys()]] - Return keys for an <html><b><span style="color:green">array<span style="color:black"></b></html> that has key/value pairs
  
 [[uphp:variables|uPHP Variable Types and Limits]] [[uphp:variables|uPHP Variable Types and Limits]]
  
uphp/functions/array.1490966645.txt.gz · Last modified: 2021/09/13 05:56 (external edit)