Convert JSON format to PHP array method

Source: Internet
Author: User
This article mainly and everyone to share the JSON format converted to PHP array method, hope to help everyone.

<?php$str=<<<str        [{"Value": "100," "Color": "#F38630"},{"value": "Color": "#E0E4CC"},{"value" Color ":" #69D2E7 "}]str;//converts a JSON-formatted string into an array $arr=json_decode ($STR, True) through the Json_decode method; Var_dump ($arr);d ie;? >

Related recommendations:

How JSON data formats are converted to PHP arrays

How this JSP code is converted to PHP code

List parsing-How Python's list strings are converted to PHP arrays

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.