Array
(
[0] => Thermex
[1] => Tesy
[2] => Thermex
[3] => Thermex
[4] => Thermex
[5] => Nova Tec
[6] => Ariston
[7] => Ariston
[8] => Ariston
[9] => Ariston
[10] => Ariston
[11] => Ariston
[12] => Ariston
[13] => Ariston
[14] => Ariston
[15] => Gorenje
[16] => Grunhelm
[17] => Grunhelm
[18] => Tesy
[19] => Tesy
[20] => Grunhelm
[21] => Grunhelm
[22] => Grunhelm
[23] => Grunhelm
Array
(
[] => SimpleXMLElement Object
(
[0] => Thermex
)
[1] => SimpleXMLElement Object
(
[0] => Tesy
)
[2] => SimpleXMLElement Object
(
[0] => Thermex
)
[3] => SimpleXMLElement Object
(
[0] => Thermex
)
[4] => SimpleXMLElement Object
(
[0] => Thermex
)
foreach($products as $product){
$quantity = $product->Availability;
if($quantity == 'z'){
$quantity = 0;
}else{
$quantity = 100;
}
foreach($product->Vendor as $vendor){
}
$products = simplexml_load_string($output); // полученные данные по API при помощи Curl
foreach($products as $product){
$quantity = $product->Availability;
if($quantity == 'z'){
$quantity = 0;
}else{
$quantity = 100;
}
//далее sql запросы в бд для вставки
}