i have a problem with a stdObject. i did not find a solution for my problem. there are products that have images
[products] => array
(
[0] => stdClass Object
(
[images] => Array
(
[0] => stdClass Object
(
[original_url] => /path/to/the/picture.jpg
But there are also products that have no images and [original_url] => /path/to/the/picture.jpg does not exist. How can I check if [original_url] => /path/to/the/picture.jpg does not exist?
foreach($product->images as $images){
$PIC_url = $images->original_url;
if(!property_exists($images,'original_url')){
$whole_pic_url = 'https://path.to/alternative/picture.jpg';
} else {
$whole_pic_url = "https://www.path.to".$PIC_url . ',';
}
}
best regards dashmir