Its JSON, lớn convert to array use json_decode():
$string = ""; $my_array = json_decode($string,true); eđến $my_array<"status">; // output: 2
Bạn đang xem: Convert string array to array php
Probably better to lớn persize a var_dump($my_array) or print_r($my_array) lớn allow the OP. to see the complete array. Also json_decode returns an object so you would use $my_array->status. And you are missing a ; semi-colon on the end of $string. – TimBrownlaw Jan 25 "18 at 23:42
To return an associative array you would use json_decode($string, true); Reference: php.net/manual/en/function.json-decode.php – TimBrownlaw Jan 25 "18 at 23:44
AhmadSopian If this solved your issue, please click the 'checkmark' to accept this answer. – IncredibleHat Jan 25 "18 at 23:53
Thanks for contributing an answer khổng lồ Stack Overflow!
Please be sure lớn
answer the question. Provide details and share your research!
But avoid …
Asking for help, clarification, or responding lớn other answers.Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Post Your Answer Discard
By clicking “Post Your Answer”, you agree lớn our terms of service, privacy policy and cookie policy
Not the answer you're looking for? Browse other questions tagged php arrays string associative sầu or ask your own question.
What's the source for the מעשה בר' אליעזר... שהיו מסובין of the הגדה?
Traveling lớn Switzerl& from the US with a transit in the Netherlands, what is the maximum amount of currency I may carry with me?
What is the Wine/Water Paradox in Bayesian statistics, & what is its resolution? more hot questions
Staông chồng Overflow Questions Jobs Developer Jobs Directory Salary Calculator Help Mobile
Products Teams Talent Advertising Enterprise
Company About Press Work Here Legal Privacy Policy Terms of Service Liên hệ Us Cookie Policy
Staông xã Exchange Network Technology Life / Arts Culture / Recreation Science Other
Xem thêm: Sửa Lỗi Build 7601 Win 7 Build 7601, Máy Tính Bị Lỗi Build 7601
Stachồng Overflow Server Fault Super User Web Applications Ask Ubuntu Webmasters Game Development
TeX - LaTeX Software Engineering Unix & Linux Ask Different (Apple) WordPress Development Geographic Information Systems Electrical Engineering
Android Enthusiasts Information Security Database Administrators Drupal Answers SharePoint User Experience Mathematica
Salesforce ExpressionEngine® Answers Staông xã Overflow em Português Blender Network Engineering Cryptography Code reviews
Magenkhổng lồ Software Recommendations Signal Processing Emacs Raspberry Pi Staông xã Overflow на русском Code Golf
Staông xã Overflow en español Ethereum Data Science Arduino Bitcoin Software Quality Assurance & Testing Sound Design
Windows Phone
more (28) Photography Science Fiction & Fantasy Graphic Design Movies & TV Music: Practice & Theory Worldbuilding Video Production
Seasoned Advice (cooking) Home Improvement Personal Finance & Money Academia Law Physical Fitness Gardening & Landscaping
Parenting
more (10) English Language & Usage Skeptics Mi Yodeya (Judaism) Travel Christianity English Language Learners Japanese Language
Chinese Language French Language German Language Biblical Hermeneutics History Spanish Language Islam
Русский язык Russian Language Arqade (gaming) Bicycles Role-playing Games Anime & Manga Puzzling
Motor Vehicle Maintenance & Repair Board & Card Games Bricks Homebrewing Martial Arts The Great Outdoors Poker
Chess Sports
more (16) MathOverflow Mathematics Cross Validated (stats) Theoretical Computer Science Physics Chemistry Biology
Computer Science Philosophy Linguistics Psychology & Neuroscience Computational Science
more (10) Blog Facebook Twitter LinkedIn Instagram
site design / biểu tượng logo © 2021 Staông xã Exchange Inc; user contributions licensed under cc by-sa. rev 2021.3.19.38843