Apologies in advance since I'm a PHP novice and I'm sure I'm not using the right terms here.
I am making an automated product data feed using a set of provided SKUs, but the feed requires separate entries for size and gender variation of the products.
Is there a simple way to take this:
$SKUs = array('Product1', 'Product2', 'Product3')
And "multiply" each entry in the array with these:
$gender = array('M', 'F');
$size = array('S', 'M', 'L', 'XL');
So that I end up with this result:
$feed = array('Product1M-S', 'Product1M-M', 'Product1M-L', 'Product1M-XL', 'Product1F-S'...)
array_combineandarray_merge, but those obviously didn't suit my purposes. I did also try doing a foreach loop with my arrays, but it didn't work for me. Being new to PHP, I didn't know I needed the empty brackets to properly pass my variables.