almightyegg Posted December 25, 2012 Share Posted December 25, 2012 Hi guys! I have a logon script that I'm working on to try and get Facebook sign up/log in working. When registering it is now getting all the values I need which is great but it's chucking them into an awkward set of arrays... Array ( [algorithm] => HMAC-SHA256 [expires] => 1356426000 [issued_at] => 1356420441 [oauth_token] => AAAHTZCHpjGLMBAIBAtq5BOeMO4QSpmOQqq2UuinbqUgsZB4FeBICfXqUPXrVrvYVcPcnqyH9Lg9lQskzOhbZCKOUFOFxN61Fue0NSbeCzztygWTFLwR [registration] => Array ( [name] => William Masters [birthday] => 01/19/xxxx [location] => Array ( [name] => Bristol, United Kingdom [id] => 108700782494847 ) [gender] => male [email] => [email protected] [username] => [email protected] [password] => blahlbahalbah ) [registration_metadata] => Array ( [fields] => [{"name":"name"}, {"name":"birthday"}, {"name":"location"}, {"name":"gender"}, {"name":"email"}, {"name":"username","description":"Username","type":"text"}, {"name":"password"}] ) [user] => Array ( [country] => gb [locale] => en_GB ) [user_id] => 1617300026 ) So I now need to grab all these values and insert them in my database, how would I go about doing this?? I am very rusty with my PHP - used to be pretty sharp but haven't done it in a few years now Cheers Link to comment https://forums.phpfreaks.com/topic/272345-inserting-an-array-into-my-database/ Share on other sites More sharing options...
requinix Posted December 25, 2012 Share Posted December 25, 2012 It's all a multidimensional array except for ["registration_metadata"]["fields"], which is a string you can decode into an object or array (whichever you like more). Link to comment https://forums.phpfreaks.com/topic/272345-inserting-an-array-into-my-database/#findComment-1401202 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.