php array function

不言
Release: 2023-03-24 08:44:02
Original
1244 people have browsed it

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

<?php
    $a1=array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow");
    $result=array_flip($a1);
    print_r($result);
?>
Copy after login

Output results:

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!