Flipping Keys with Values in an Array in PHP


Swap the keys with their associated values in an array using array_flip().

Source Code

$flip = array_flip($assoc);
print_r($flip);
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments