array_flip(array);

用于反转/交换数组中的键名和对应关联的键值.

示例:

$a1=array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow"); 
$result=array_flip($a1); 
print_r($result);

输出:

Array ( [red] => a [green] => b [blue] => c [yellow] => d )

 

 

作者 admin

百度广告效果展示