zohab Posted May 6, 2009 Share Posted May 6, 2009 Hi all, I have an array as follow. Array ( [0] => orange [1] => banana [2] => apple [3] => raspberry ) I want to convert it to key value array. Array ( [orange] => banana [apple] => raspberry ) How can i implement it dynamically(using for loop or any other solution). Any idea? Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 6, 2009 Share Posted May 6, 2009 That makes no sense. What if the array has an odd number of items? Then there will be a mismatch. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.