Easy Tutorial
❮ Func Mysqli Dump Debug Info Func Cal Jddayofweek ❯

PHP array_flip() Function

Complete PHP Array Reference Manual

Example

Reverse the keys and their associated values in an array:


Definition and Usage

The array_flip() function is used to reverse/swap the keys and their associated values in an array.


Syntax

Parameter Description
array Required. Specifies the array to be reversed/swapped.

Technical Details

Return Value: Returns the reversed array if successful. Returns NULL if it fails.
PHP Version: 4+
--- ---
❮ Func Mysqli Dump Debug Info Func Cal Jddayofweek ❯