Nie działa niestety.
Pobierane dane:
'key' => 'xxxxxxxxxxxxxxxxxxxxxxxx',
'viewType' => 'json',
'module' => 'products',
'method' => 'selectIds',
'products_id' => array(10
) )
);
$postData = http_build_query($postData);
$ch = curl_init('http://api2.redcart.pl/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
$data = curl_exec($ch);
curl_close($ch);
Proszę o podpowiedź jak odwołać się do elementu [products_id]
stdClass Object
(
[count] => 1
[products] => Array
(
[0] => stdClass Object
(
[products_id] => 10
[products_name] => Groszek marynowany
[products_description_short] =>
[products_description] =>