How to avoid inserting data into the database as a PHP array?-php Tutorial

Source: Internet
Author: User
How can this data be processed into a PHP array and inserted into the database? {& nbsp; & quot; statuses & quot;: [& nbsp ;{& nbsp; & quot; created_at & quot ;: & quot; TueMay3117: 46: 55 + 08002011 & quot;, & nbsp; & q
{
"Statuses ":[
{
"Created_at": "Tue May 31 17:46:55 + 0800 2011 ",
"Id": 11488058246,
"Text": "follow. ",
"Source": "Sina Weibo ",
"Favorited": false,
"Truncated": false,
"In_reply_to_status_id ":"",
"In_reply_to_user_id ":"",
"In_reply_to_screen_name ":"",
"Geo": null,
"Mid": "5612814510546515491 ",
"Reposts_count": 8,
"Comments_count": 9,
"Annotations": [],
"User ":{
"Id": 1404376560,
"Screen_name": "zaku ",
"Name": "zaku ",
"Province": "11 ",
"City": "5 ",
"Location": "Chaoyang district, Beijing ",
"Description": "Fifty years of life is like a dream. if there is life, there is death. ",
"Url": "http://blog.sina.com.cn/zaku ",
"Profile_image_url": "http://tp1.sinaimg.cn/1404376560/50/0/1 ",
"Domain": "zaku ",
"Gender": "m ",
"Followers_count": 1204,
"Friends_count": 447,
"Statuses_count": 2908,
"Favourites_count": 0,
"Created_at": "Fri Aug 28 00:00:00 + 0800 2009 ",
"Following": false,
"Allow_all_act_msg": false,
"Remark ":"",
"Geo_enabled": true,
"Verified": false,
"Allow_all_comment": true,
"Avatar_large": "http://tp1.sinaimg.cn/1404376560/180/0/1 ",
"Verified_reason ":"",
"Follow_me": false,
"Online_status": 0,
"Bi_followers_count": 215
}
},
...
],
"Previus_cursor": 0, // not supported currently
"Next_cursor": 11488013766, // not supported currently
"Total_number": 81655
}

------ Solution --------------------
This is in json format. you can try to use the json_encode function for parsing.
------ Solution --------------------
This is Sina's data
Sina provides php sdk

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.