I'm trying to get the value of a specific key in an array or string format, but I can't seem to figure out how to make it work.
So, this is an example of an array I'm working with, for example, I'm trying to get all the product_id's in a single array or string format.
Like output productIdArray[] = ['34441', '34442' , '34444'];
Tried achieving this using for each but, Is there a better way to do that?
Any help would be appreciated, Thanks!
(
[0] => ( Array
(
[id] => 1333708
[abc_id] => 429084
[test_id] => 58291
[order_id] => 2222
[product_id] => 34441
)
)
[1] => ( Array
(
[id] => 1333708
[abc_id] => 429084
[test_id] => 58291
[order_id] => 2222
[product_id] => 34442
)
)
[2] => ( Array
(
[id] => 1333708
[abc_id] => 429084
[test_id] => 58291
[order_id] => 2222
[product_id] => 34444
)
)
)