Hello friends today i am going to teach you about the Array_flip...It define as "The array_flip() function flips/exchanges all keys with their associated values in an array."
Now,we know about syntax of array_flip-
Syntax="array_flip(array);"
For example-
<?php
$arrayName = array("course1"=>"Java","course2"=>"Android");
$new_array = array_flip($arrayName);
print_r($new_array);
?>
OUTPUT :
Array
(
[Java] => course1
[Android] => course2
)
Posted by Amit Tiwari
@Facebook
Now,we know about syntax of array_flip-
Syntax="array_flip(array);"
For example-
<?php
$arrayName = array("course1"=>"Java","course2"=>"Android");
$new_array = array_flip($arrayName);
print_r($new_array);
?>
OUTPUT :
Array
(
[Java] => course1
[Android] => course2
)
Posted by Amit Tiwari
No comments:
Post a Comment