aximbigfan Posted November 27, 2008 Share Posted November 27, 2008 Is there a PHP function that will shift an array around like this: BEFORE: ARRAY { a = 29 b = 87 } AFTER: ARRAY { 29 = a 87 = b } I could do this easily, but wanted to know if there is already a function to do the same. Thanks, Chris Link to comment https://forums.phpfreaks.com/topic/134437-function-to-shift-keys-in-array-with-values/ Share on other sites More sharing options...
genericnumber1 Posted November 27, 2008 Share Posted November 27, 2008 http://us3.php.net/manual/en/function.array-flip.php Link to comment https://forums.phpfreaks.com/topic/134437-function-to-shift-keys-in-array-with-values/#findComment-699892 Share on other sites More sharing options...
aximbigfan Posted November 27, 2008 Author Share Posted November 27, 2008 Thanks! Link to comment https://forums.phpfreaks.com/topic/134437-function-to-shift-keys-in-array-with-values/#findComment-699896 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.