different elements of array php

PHP
$nums = [1, 2, 3, 4, 5];<?php
$input = array("a" => "green", "red", "b" => "green", "blue", "red");
$result = array_unique($input);
print_r($result);
?>

Array
(
    [a] => green
    [0] => red
    [1] => blue
)
Source

Also in PHP: