status" /> status" />

Php convert array string to array

Its JSON, to convert to lớn array use json_decode():

$string = ""; $my_array = json_decode($string,true); eđến $my_array<"status">; // output: 2

Bạn đang xem: Php convert array string to array

Probably better khổng lồ persize a var_dump($my_array) or print_r($my_array) to allow the OP.. khổng lồ 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 over 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 cliông xã the 'checkmark' to lớn accept this answer. – IncredibleHat Jan 25 "18 at 23:53


Thanks for contributing an answer to Staông chồng Overflow!

Please be sure to lớn answer the question. Provide details and nội dung your research!

But avoid

Asking for help, clarification, or responding to 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 khổng lồ 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.


Does 「拝見ありがとうございます」 ever make sense?
My bus hasn't left Salem for several hours, no ETA updated - It's hours behind schedule, What should I do?
Why has a rocket system like Starship never been proposed before? It does not seem lớn use any new science, materials or fuels
Is there any difference between the way we are to honor the Son and the way we are to lớn honor the Father? John 5:22-23 more hot questions
Stachồng Overflow Questions Jobs Developer Jobs Directory Salary Calculator Help sản phẩm điện thoại
Products Teams Talent Advertising Enterprise
Company About Press Work Here Legal Privacy Policy Terms of Service Liên hệ Us Cookie Policy
Staông chồng Exchange Network Technology Life / Arts Culture / Recreation Science Other
Staông chồng Overflow Server Fault Super User Web Applications Ask Ubuntu Webmasters trò chơi Development

Xem thêm: Các Món Ăn Từ Cá Diêu Hồng, Ăn Mãi Không Ngán, Cách Làm Cá Diêu Hồng Hấp Tàu Xì

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
Magenlớn 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) trang chủ 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 thiết kế / biệu tượng công ty © 2021 Staông chồng Exchange Inc; user contributions licensed under cc by-sa. rev 2021.3.23.38880