То, что я пытаюсь сделать, это написать строку html в контроллере с зацикленными значениями массива. Так, например;
$content = "Your store, at location A, has these items added to them". add array loop here. "Do take note!";
Мой массив будет таким:
array (
0 =>
array (
'id' => '5db29b6d31c391731239bbdf',
'name' => 'Diamond bracelet (sample)',
'tags' =>
array (
0 => 'female',
1 => 'jewelry',
),
'category' => 'Accessories',
'sku' => '1029EHW',
'priceType' => 'Fixed',
'unitPrice' => 190,
'cost' => 90,
'trackStockLevel' => true,
'isParentProduct' => false,
),
1 =>
array (
'id' => '5db29b6d31c391731239bbdb',
'name' => 'Long-sleeved shirt(sample)(M)',
'tags' =>
array (
0 => 'tops',
1 => 'cotton',
),
'category' => 'Women\'s Apparel',
'sku' => 'ABC1234-M',
'priceType' => 'Fixed',
'unitPrice' => 47.170000000000002,
'cost' => 20,
'trackStockLevel' => true,
'isParentProduct' => false,
'parentProductId' => '5db29b6d31c391731239bbd4',
'variationValues' =>
array (
0 =>
array (
'variantGroupId' => '5db29b6d31c391731239bbd5',
'value' => 'M',
),
),
),
)
Обратите внимание, что массив может иметь много экземпляров product_name и sku или не иметь ни одного.
Как сделатья заполняю это в своей строке, чтобы быть как;
$content = "Your store, at location A, has these items added to them, 1) asd, 2)def, 3)asf . Do take note!