";
foreach ($resource['properties'] as $property_name=>$property_value) {
if ($property_name != 'description' && $property_value && $property_value != 'none') {
$resource_properties .= "
".$property_name.": ".$property_value."
";
}
}
$resource_properties .= "
";
$code = $resource_template;
$code = str_replace ("$(resource_id)", $resource_id, $code);
$code = str_replace ("$(resource_name)", $resource['name'], $code);
$code = str_replace ("$(resource_images)", $resource_images, $code);
$code = str_replace ("$(resource_description)", $resource['properties']['description'], $code);
$code = str_replace ("$(resource_properties)", $resource_properties, $code);
echo $code;
}
$max_page = (int) $response_json['data']['max_page'];
if (!$max_page || ++$page > $max_page)
break;
}
?>