">
 
+1 vote
29 views

I printed this json from a get_file_contents output.

{"status":"INVALID_CREDENTIALS"}

Now I want to echo the content of "status" and I used

echo $status

but not working. Please help.

by (1.2k points)   | 29 views

1 Answer

+1 vote

try this


$data = json_decode(file_get_contents("url"), true);

echo $data['status'];
by (3.1k points)  

Related questions

+3 votes
1 answer
asked Mar 30 by toheed (1.2k points) | 22 views
+2 votes
0 answers
+4 votes
1 answer
asked Mar 29 by admin (1.3k points) | 38 views
+3 votes
1 answer
asked Apr 12 by athar (3.1k points) | 39 views
+4 votes
1 answer
asked Mar 20 by Ron | 38 views
+2 votes
0 answers
+3 votes
0 answers
asked Jun 17 by noor (1.1k points) | 8 views
+3 votes
1 answer
+1 vote
1 answer




Welcome to Meansflow - Where Developers and Students Learn, Share, & Build Careers, where you can ask questions and receive answers from other members of the community.
113 questions
85 answers
38 comments
103 users