I have a json format as below
{
"results": [
{
"url": "someurl",
"imageUrl": "somepath",
"tickets": [
{
"id": 98655,
"name": "ADULT TICKET",
"soldOut": false,
"provisionallySoldOut": false,
"price": 100,
"salesStart": "2018-06-26T11:52:00",
"salesEnd": "2018-07-28T17:00:00",
"description": "",
"donation": false,
"vendorTicket": false
},
{
"id": 98656,
"name": "UNDER 12",
"soldOut": false,
"provisionallySoldOut": false,
"price": 80,
"salesStart": "2018-06-26T11:53:00",
"salesEnd": "2018-07-28T17:00:00",
"description": "",
"donation": false,
"vendorTicket": false
}
]
},
{
"url": "someurl",
"imageUrl": "somepath",
"tickets": [
{
"id": 98735,
"name": "ADULT EARLY BIRD",
"soldOut": false,
"provisionallySoldOut": false,
"price": 150,
"salesStart": "2018-06-26T12:47:00",
"salesEnd": "2018-08-12T10:00:00",
"description": "",
"donation": false,
"vendorTicket": false
},
{
"id": 98736,
"name": "UNDER 12 - EARLY BIRD",
"soldOut": false,
"provisionallySoldOut": false,
"price": 120,
"salesStart": "2018-06-26T12:47:00",
"salesEnd": "2018-08-12T10:00:00",
"description": "",
"donation": false,
"vendorTicket": false
}
]
}
],
"pageSize": 10,
"pages": 1,
"records": 2,
"extras": null,
"message": null,
"statusCode": 0
}
I have a table in my database as "event_tickets" and it has columns of name and price i want to show the names ADULT TICKET and UNDER 12 in the same column separated by comma and prices 100 and 80 in the same column under price separated by comma
i want it to show something like this on my table.To make it more clear I want to INSERT the value as mentioned in the table above using php. The table format should be like so
name | price
ADULT TICKET,UNDER 12 | 100,80
ADULT EARLY BIRD, UNDER 12 - EARLY BIRD | 150,120
is there any way i can achieve that using php?
because when i try to run my code the names show on different column and prices in different columns
Thanks in advance