Cool Ajax - Web Development Tutorial Blog

Tag : flip array value

Array flip and reverse in php

Flip and reverse sounds similar. Don’t mix-up them 🙂 array_flip function is useful when you only want to shift array index as array value and vice-verse. On the other hand if you want to change only array index in descending/reverse order then array_reverse function works great. Array flip convert key in to index and index in to key. $a = [...]