This article introduces the content of PHP array functions, which has certain reference value. Now I share it with everyone. Friends in need can refer to it
<?php $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 )
Related recommendations:
How about PHP arrays Assignment
Several methods of converting PHP operation strings into PHP arrays
How to deal with PHP array problems
The above is the detailed content of php array function. For more information, please follow other related articles on the PHP Chinese website!