I have 2 given arrys:
Array one (which are the "Headlines"):
Array
(
[0] => Kompatible Produkte
[1] => Drucktechnologie
[2] => Druckfarben
[3] => BCP-Tintentropfenfarbe
[4] => Temperaturbereich bei Lagerung
[5] => Paketgewicht
[6] => Verpackungsabmessungen (BxTxH)
)
And Array two (which are the "values")
Array
(
[0] => HP Designjet 5500, 5500ps, 5000, 5000ps
[1] =>
[2] => Black
[3] =>
[4] => -40 - 60
[5] => 230
[6] => 114 x 36 x 264
)
Now I would like to combine these 2 Arrays in a 3 Array... The array 3 looks like:
$data[] = array(
'sku' => '291',
'_type' => 'simple',
'_attribute_set' => 'Default',
'_product_websites' => 'base',
'name' => 'C4950A',
'manufacturer' => 'HP Inc.',
'meta_autogenerate' => 'yes',
'short_description' => 'HP 81',
'qty' => 2,
);
And I would like to have this:
$data[] = array(
'sku' => '291',
'_type' => 'simple',
'_attribute_set' => 'Default',
'_product_websites' => 'base',
'name' => 'C4950A',
'manufacturer' => 'HP Inc.',
'meta_autogenerate' => 'yes',
'short_description' => 'HP 81',
'qty' => 2,
'Kompatible Produkte' => 'HP Designjet 5500, 5500ps, 5000, 5000ps',
'Drucktechnologie' => '',
'Druckfarben' => 'Black',
'BCP-Tintentropfenfarbe' => '',
'Temperaturbereich bei Lagerung' => '-40 - 60',
'Paketgewicht' => '230',
'Verpackungsabmessungen (BxTxH)' => '114 x 36 x 264'
);
The amount of values in array one and two is always the same. I thought it would be possible with "for each", but I can't find a working solution...
Thank you for any help!