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/28 20:00]
jeff
uphp:functions:array [2021/09/13 05:57] (current)
Line 1: Line 1:
 ======array====== ======array======
 +
 <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 
-<span style="color:black;"></html>[[array]] 
-<html>( [ 
-<span style="color:green;">mixed 
-<span style="color:blue;">$value 
-<span style="color:black;">[, ...] ] ) 
-</html></well> 
  
-Return an array object+<well size="sm"><html> 
 +<span style="font-size:125%;color:green">array 
 +<span style="color:black">array ( [ 
 +<span style="color:green">mixed 
 +<span style="color:blue">$value 
 +<span style="color:black">[, ...] ] ) 
 +</html></well>
  
 ====Parameters==== ====Parameters====
-<html><span style="color:blue;"><b>$value(s)</b><span style="color:black;"></html>:  Optional comma separated list of values of any type (string, int, float, array) 
  
-====Return Value==== +<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> 
-Array of values+ 
 +====Return Values==== 
 + 
 +<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 37: Line 40:
 </code> </code>
  
-**Key/Value Pairs:**+===Key/Value Pairs===
  
 <code php> <code php>
Line 60: Line 63:
  
 ====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 
  
-[[sizeof()]] - Return the number of elements in an array+[[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 <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.1490731259.txt.gz · Last modified: 2021/09/13 05:56 (external edit)