JArrayHelper::pivot
Pivots an array to create a reverse lookup of an array of scalars, arrays or objects.
Signature
public function pivot(array
$source,
[string
$key = null] )
Parameters
-
$source
- The source array.
-
$key
- Where the elements of the source array are objects or arrays, the key to pivot on.
Returns
- array
- An array of arrays pivoted either on the value of the keys, or an individual key of an object or array.