I've been using the following to build a clause for multiple deletes at once which works great. This was for single dimension arrays though.
$prefix = $in_clause = '';
$binding_clause = array();
foreach($selected as $key => $value)
{
$in_clause .= $prefix.':selected_'.$key;
$prefix = ', ';
$binding_clause[':selected_'.$key] = $value;
}
Now, I need to use it on a specific value of a multidimensional array. Given this :
Array
(
[0] => Array
(
[account_id] => 2
[screenshot_id] => 120262
[image_filename] => a1.jpg
)
[1] => Array
(
[account_id] => 2
[screenshot_id] => 120263
[image_filename] => a2.jpg
)
.......
I only need the key value and the screenshot_id value so I am trying to change the first function so the values are :
key = 0, value = 120262
key = 1, value = 120263
Hopefully that makes sense. Not sure how to do this with a multi-array.