Reversing Arrays in PHP
array_fliparray_reverseЗадание 1
Given an array:
php<?php
$arr = ['a' => 1, 'b' => 2, 'c' => 3];
?>
Swap the keys and values in it.
Задание 2
Given an array:
php<?php
$arr = [1, 2, 3, 4, 5];
?>
Make the following array from it:
php<?php
[5, 4, 3, 2, 1]
?>