..


Sponsored Links

array_flip

Array_fli function reverses the original values ​​of the keys. The function in question, then, returns a new array with all keys and values ​​as values ​​as keys.

The function takes one parameter as the original array.

Here's an example:






 $ Arr = array (0 => "Dog", 1 => "Cat", 2 => "Rat");







 print_r (array_flip ($ arr));



The output of the code above will be:
 



 Array (

 

  



 [Dog] => 0

 

  



 [Cat] => 1

 

  



 [Mouse] => 2

 





 )

 

In the same category ...
E-Learning
Linux (Course) Linux (Course)
Complete guide to open-source system. From 49 €.
MySQL (Course) MySQL (Course)
Management of open-source database. From 39 €.
PHP (Course) PHP (Course)
Full course for creating dynamic Web sites. From 49 €.
Sponsored Links