If you Google it you will find your answer in first Link.
Anyway this is the source
The array_flip() function flips/exchanges all keys with their associated values in an array.
Syntax: array_flip(array);
Example:
<?php
$a1=array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow");
$result=array_flip($a1);
print_r($result);
?>
Output
Array ( [red] => a [green] => b [blue] => c [yellow] => d )