0
My array in print_r displays like this:
[
{
"id": "A220",
"name": "Dipirona",
"symbol": "R$",
"rank": "1",
"price_br": "8.4",
"price_usd": "2.0"
"total_supply": "287.0",
"max_supply": "21000.0",
"last_updated": "1519152868"
},
{
"id": "A220",
"name": "Eno",
"symbol": "R$",
"rank": "3",
"price_br": "2.4",
"price_usd": "1.0"
"total_supply": "341.0",
"max_supply": "1200.0",
"last_updated": "1615122869"
}
]
How to recover the ID values: A220, for example, which are the product data "Dipirona", and store in another array only the data of the "Dipirona"" ?
Failed, error appeared: Warning: Illegal string offset 'id' in C: xampp htdocs testes index.php on line 59 h foreach($Remedies as $remedio){ echo $remedio['id']; }
– ElvisP