Home  >  Article  >  Backend Development  >  php array function

php array function

不言
不言Original
2018-04-17 15:22:561171browse

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 array functions

1. array_flip() reverses all keys in the array and their associated values

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

Output results:

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn