API16:JUtility/array unshift ref
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
Prepend a reference to an element to the beginning of an array. Renumbers numeric keys, so $value is always inserted to $array[0]
Description:JUtility/array unshift ref
Syntax
array_unshift_ref(&$array, &$value)
| Parameter Name | Default Value | Description |
|---|---|---|
| &$array | array | |
| &$value | mixed |
Returns
int
Defined in
libraries/joomla/utilities/utility.php
Importing
jimport( 'joomla.utilities.utility' );
Source Body
function array_unshift_ref(&$array, &$value) { $return = array_unshift($array,''); $array[0] =& $value; return $return; }
[Edit See Also] SeeAlso:JUtility/array unshift ref
Examples
<CodeExamplesForm />
