I cant figure out how to get Array 1 and make it look like Array 2 so that I can send it as parameters for my prepared statements method.
ARRAY 1: (what I currently have)
array(5) { [0]=> array(2) { ["id"]=> string(1) "1" [0]=> string(1) "1" } [1]=> array(2) { ["id"]=> string(3) "314" [0]=> string(3) "314" } [2]=> array(2) { ["id"]=> string(3) "315" [0]=> string(3) "315" } [3]=> array(2) { ["id"]=> string(3) "316" [0]=> string(3) "316" } [4]=> array(2) { ["id"]=> string(3) "317" [0]=> string(3) "317" } }
ARRAY 2: What I'm trying to get it to be. (please ignore that 1 item is missing)
array(4) { [0]=> int(314) [1]=> int(315) [2]=> int(316) [3]=> int(317) }
I'm trying to accomplish this in PHP php7.1 if that matters.
I THINK this is enough information but if its not please let me know. I just didnt want to bog you down with all sorts of code and explanation that I'm not sure you need.
What I've tried so far (although possibly not properly):
$category_ids2 = array_values($category_ids);