">
 
+1 vote
66 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.4k points)   | 66 views

1 Answer

+1 vote

try this


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

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

Related questions

+1 vote
1 answer
asked Oct 4 by toheed (1.4k points) | 11 views
+3 votes
1 answer
asked Mar 30 by toheed (1.4k points) | 27 views
+2 votes
0 answers
+4 votes
1 answer
asked Mar 29 by admin (1.3k points) | 46 views
+3 votes
1 answer
asked Apr 12 by athar (3.3k points) | 51 views
+2 votes
0 answers
+3 votes
0 answers
asked Jun 17 by noor (1.1k points) | 10 views
+3 votes
1 answer
+4 votes
1 answer
asked Mar 20 by Ron | 47 views




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.
118 questions
90 answers
43 comments
111 users