I have this array posting to my controller:
Array
(
[id] => Array
(
[0] => 95
[1] => 69
)
)
I want:
Array(
[id] => 95
[id] => 69
)
As I am using CodeIgniter's $this->db->delete() function and it takes the array key value as the column for the WHERE clause. I have this code at the moment:
foreach($ids as $k => $v){
$formatIds['id'] = $v;
}
Which just gives me one of the rows and not the rest.
I then tried:
foreach($ids as $k => $v){
$formatIds['id'][] = $v;
}
But this gives me a MultiDimensional array...
Array( [0] => 95 [1] => 69 )is possible; but you can't have multiple array elements with the same key