You are viewing an older version of the site. Click here to view
the latest version of this page. (This may be a dead link, if so, try the root page of the docs
here.)
== array_normalize ==
Copy Code
The output would be:
Copy Code
The output would be:
Returns a new normal array, given an associative array. (If the array passed in is not associative, a copy of the array is returned).
=== Vital Info ===
{| style="width: 40%;" cellspacing="1" cellpadding="1" border="1" class="wikitable"
|-
! scope="col" width="20%" |
! scope="col" width="80%" |
|-
! scope="row" | Name
| array_normalize
|-
! scope="row" | Returns
| array
|-
! scope="row" | Usages
| array
|-
! scope="row" | Throws
| [[../objects/ms.lang.CastException|ms.lang.CastException]]
|-
! scope="row" | Since
| 3.3.0
|-
! scope="row" | Restricted
| No
|-
! scope="row" | Optimizations
| [[../../Optimizer#NO_SIDE_EFFECTS|NO_SIDE_EFFECTS]]
|}
=== Usages ===
array_normalize(array)=== Examples === ====Example 1==== Basic usage Given the following code:
array_normalize(array(one: 'a', two: 'b', three: 'c'))

1 {{function|array_normalize}}({{function|array}}(one: 'a', two: 'b', three: 'c'))
:{a, c, b}====Example 2==== Usage with normal array Given the following code:
array_normalize(array(1, 2, 3))

1 {{function|array_normalize}}({{function|array}}(1, 2, 3))
:{1, 2, 3}
Find a bug in this page? Edit this page yourself, then submit a pull request. (Note this page is automatically generated from the documentation in the source code.)