I am using PHP to interact with an API and I am having trouble displaying the value of a sub sub item in a json decoded array that is a response from an API request. I can successfully display all of the array data but I can't display the specific value I am looking for which is the product image link.
I am trying to access 'data->images->link' from the response format below:
{
"status": 0,
"country": "string",
"page_count": 0,
"page_current": 0,
"page_size": 0,
"total_items": 0,
"data": {
"code": 0,
"name": "string",
"description": "string",
"categories": [
"string"
],
"colours": "string",
"dimensions": [
"string"
],
"sizing": [
{
"sizing_line": "string"
}
],
"materials": "string",
"specifications": "string",
"branding_options": [
{
"print_type": "string",
"print_description": "string"
}
],
"packaging": "string",
"carton": {
"length": 0,
"width": 0,
"height": 0,
"weight": "string",
"quantity": 0
},
"full_colour": 0,
"mix_and_match": 0,
"image_count": 0,
"images": [
{
"link": "string",
"name": "string"
}
],
"product_wire": "string",
"pricing": [
{
"type": "string",
"primary_price_description": "string",
"less_than_moq": "string",
"prices": [
{
"quantity": 0,
"price": 0
}
],
"additional_costs": [
{
"description": "string",
"unit_price": 0,
"setup_price": 0
}
],
"pricing_comment": "string"
}
]
}
}
Any help or advice is much appreciated! Thank you :)