1
我有一個JSON字符串。PHP檢查JSON以查看它是否處於掛起狀態和/或未掛起
- 我想呼應「待定」如果狀態掛起,
- 我想回聲「活躍」如果狀態處於活動狀態,
- 我想回聲「無效的」,如果無效。
的Json
待定:
"{"result":"success","message":"License key details retrieved.","status":"pending","max_allowed_domains":"1","email":"","registered_domains":[],"date_created":"","date_renewed":"","date_expiry":""}"
活動:
"{"result":"success","message":"License key details retrieved.","status":"active","max_allowed_domains":"1","email":"","registered_domains":[],"date_created":"","date_renewed":"","date_expiry":""}"
無效:
"{"result":"error","message":"Invalid license key"}"
謝謝!
所以解碼JSON到本地的PHP結構,然後訪問該結構的/測試件等使用任何其他結構。 –
你累了什麼?我們幫助解決問題不會給你答案... – nerdlyist