phpで連想配列形式で次のTwitterデータを出力していますが、このデータをmysqlデータベーステーブルに挿入するにはどうすればよいですか。これを行う方法を提案してください。
Array (
[created_at] => Fri, 02 Nov 2012 18:15:57 +0000
[from_user] => VolksblattNews
[from_user_id] => 828753642
[from_user_id_str] => 828753642
[from_user_name] => Volksblatt News
[geo] => [id] => 2.6443066310356E+17
[id_str] => 264430663103557632
[iso_language_code] => de
[metadata] => Array ( [result_type] => recent )
[profile_image_url] => http://a0.twimg.com/profile_images/2619216207/VB_48x48_reasonably_small_normal.gif
[profile_image_url_https] => https://si0.twimg.com/profile_images/2619216207/VB_48x48_reasonably_small_normal.gif
[source] => <a Google</a> => Bundesrat Burkhalter verstärkt Schweizer Beziehungen zu Burma: RANGUN - Didier Burkhalter hat… http://t.co/BF3aX2bY
[to_user] =>
[to_user_id] => 0
[to_user_id_str] => 0 [
to_user_name] => )
次のプログラムからこの出力を取得しました。
<?php
//a json string
$jsonstring='{
"created_at": "Fri, 02 Nov 2012 18:15:57 +0000",
"from_user": "VolksblattNews",
"from_user_id": 828753642,
"from_user_id_str": "828753642",
"from_user_name": "Volksblatt News",
"geo": null,
"id": 264430663103557632,
"id_str": "264430663103557632",
"iso_language_code": "de",
"metadata": {
"result_type": "recent"
},
"profile_image_url": "http://a0.twimg.com/profile_images/2619216207/VB_48x48_reasonably_small_normal.gif",
"profile_image_url_https": "https://si0.twimg.com/profile_images/2619216207/VB_48x48_reasonably_small_normal.gif",
"source": "<a href="http://www.google.com/">Google</a>",
"text": "Bundesrat Burkhalter verst\u00e4rkt Schweizer Beziehungen zu Burma: RANGUN - Didier Burkhalter hat\u2026 http://t.co/BF3aX2bY",
"to_user": null,
"to_user_id": 0,
"to_user_id_str": "0",
"to_user_name": null
}';
$arrayvariable=json_decode($jsonstring,true);
print_r ($arrayvariable);
?>
よろしく