Yaniv Posted May 3, 2020 Share Posted May 3, 2020 Hello Can you please show me how can i parse this JSON in PHP? {"status":"error","error":{"error_code":700,"error_message":"Recognition failed: you didn't send file via POST or file url as `url` param."},"requested_params":{"method":"recognize"}} I need to setup a condition : If(status="error) than $errorcode=700 errormessage=Recognition failed: you didn't send file via POST or file url as `url` param errorMethod= "recognize" Quote Link to comment https://forums.phpfreaks.com/topic/310688-parse-json/ Share on other sites More sharing options...
Barand Posted May 3, 2020 Share Posted May 3, 2020 Use json_decode() to create either an object or array. You can then access the individual elements. Quote Link to comment https://forums.phpfreaks.com/topic/310688-parse-json/#findComment-1577495 Share on other sites More sharing options...
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.