Php value --- online echo $ images output is {& quot; image_intro & quot;: & quot; images \/f201205281934101426092871.jpg & quot;, & quot; float_intro & quot ;: & quot;, & quot; image php value --- online, etc.
Echo $ images
After the output is
{"Image_intro": "images \/Intro", "float_intro": "", "image_intro_alt": "", "image_intro_caption": "", "image_fulltext ":"", "float_fulltext": "", "image_fulltext_alt": "", "image_fulltext_caption ":""}
How can I retrieve the values, such as image_inrto?
------ Solution --------------------
After json_decode, retrieve again.
------ Solution --------------------
First, convert the json format into an array.
------ Solution --------------------
Is there any json format?
PHP code
$ Str = '{"image_intro": "images \/f201205281934101426092871.jpg", "float_intro": "", "image_intro_alt": "", "image_intro_caption ":"", "image_fulltext": "", "float_fulltext": "", "image_fulltext_alt": "", "image_fulltext_caption": ""} '; $ arr = json_decode ($ str, true); echo $ arr ['image _ intro'];