I have a result array that comes back from CodeIgniter looking like this:
Array
(
[ILS] => ils
[0] => Array
(
[laser_id] => 1
[sort_order] => 1
[laser_name] => ILS12.75
[laser] => ils1275
[image] => ils1275
[link] => ils1275
)
[1] => Array
( .. )
etc.
}
I used array_merge to get the ILS item into the array, but I need it to get it into the array[0]. I also need to get a similar item into array[1] and so on in the result array. How do I do this? Here is how I got the ILS item in:
function get_laser_configs()
{
$this->db->order_by('sort_order');
$query = $this->db->get('all_lasers')->result_array();
$ils = array('ILS' => 'ils');
return array_merge($ils, $query);
}