دنبال کننده ها

۱۳۹۷ فروردین ۲۱, سه‌شنبه

How to set variables in php using JSON array

[ad_1]



Hi this is the deepest I have ever dove into PHP because today I started using curl to access the Proofhub REST API. I have managed to get the data I wanted from the API but now I want to use that data to create a dashboard.



I want to use the file I created with the JSON array to set variables in PHP. Variables like id name, variables that correspond to the data I have in the JSON array.



Section of JSON Array file:




"id": 896585647,
"title": "Butterfly Scheme Project",
"description": null,
"color": "#B200FF",
"start_date": "2016-06-08",
"end_date": null,
"template": false,
"sample_project": false,
"status":
"id": 262601041
,
"favourite": false,
"favourite_sort": null,
"import_id": 0,
"assigned": [
1228530673,
1228517105,
1228625654,
2004959642,
1228503536
],
"category":
"id": 665985348
,
"creator":
"id": 1228530673
,
"manager":
"id": 1228530673
,
"created_at": "2016-06-08T09:51:52+00:00",
"updated_at": "2018-02-15T11:25:12+00:00"



I understand that I may have to use include or file_get_contents to acheive this, but I just don't know how. I hope you can help.




[ad_2]

لینک منبع