carlosdombosco 0 Posted April 6, 2020 Report Share Posted April 6, 2020 Boa tarde pessoal. Como ler esse JSON em um foreach php { "produtos": [ { "codbar":"123456789", "nome":"FEIJÃO", "tipo":"UN", "prcprd": 4.00, "prcprm": 3.50, "estoque": 0, "categ":097 , "subcateg":09703 } { "codbar":"987654321", "nome":"ARROZ", "tipo":"UN", "prcprd": 5.00, "prcprm": 4.50, "estoque": 0, "categ":097 , "subcateg":09703} ],"atual":1,"totalPages":20} Agradeço qualquer ajuda. Quote Link to post Share on other sites
0 bross 0 Posted April 8, 2020 Report Share Posted April 8, 2020 $retorno=json_decode($json, true); foreach($retorno .... Quote Link to post Share on other sites
Question
carlosdombosco 0
Boa tarde pessoal. Como ler esse JSON em um foreach php
{
"produtos":
[
{
"codbar":"123456789",
"nome":"FEIJÃO",
"tipo":"UN",
"prcprd": 4.00,
"prcprm": 3.50,
"estoque": 0,
"categ":097 ,
"subcateg":09703 }
{
"codbar":"987654321",
"nome":"ARROZ",
"tipo":"UN",
"prcprd": 5.00,
"prcprm": 4.50,
"estoque": 0,
"categ":097 ,
"subcateg":09703} ],"atual":1,"totalPages":20}
Agradeço qualquer ajuda.
Link to post
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.