JDatabaseDriver::loadAssocList
Method to get an array of the result set rows from the database query where each row is an associative array of ['field_name' => 'row_value']. The array of rows can optionally be keyed by a field name, but defaults to a sequential numeric array.
NOTE: Chosing to key the result array by a non-unique field name can result in unwanted behavior and should be avoided.
Signature
public function loadAssocList([string
$key = null,
[string
$column = null]] )
Parameters
-
$key
- The name of a field on which to key the result array.
-
$column
- An optional column name. Instead of the whole row, only this column value will be in
Returns
- mixed
- The return value or null if the query failed.