I have an array that looks like this when printed:
Array (
[0] => stdClass Object (
[sku] => exp_pokemonketchup_001
[_id] => 539be6740478ca09233ac71e
[__v] => 0
[type] => 3
[status] => 1
[_create_date] => 2014-06-14T06:06:44.365Z
)
[1] => stdClass Object (
[sku] => exp_onepiecegobble_001
[_id] => 539be6710478ca09233ac71c
[__v] => 0
[type] => 3
[status] => 1
[_create_date] => 2014-06-14T06:06:41.110Z
)
[2] => stdClass Object (
[sku] => exp_sailormoongiggle_001
[_id] => 539be66d0478ca09233ac717
[__v] => 0
[type] => 3
[status] => 1
[_create_date] => 2014-06-14T06:06:37.633Z
)
)
I'm trying to get the sku
and corresponding value for the subsequent sku
during a foreach
loop. In other words, I’m looping through the array, echoing the first sku, which is exp_pokemonketchup_001
.
Now I also need to echo out the next sku
which is exp_onepiecegobble_001
but before the loop continues to that part of the array.