fork download
  1. <?php
  2. $array = ['pepsi','Coca','fanta','pepsi'];
  3. $array = array_unique( $array );
  4. var_dump($array);
Success #stdin #stdout 0s 82880KB
stdin
Standard input is empty
stdout
  array(3) {
  [0]=>
  string(5) "pepsi"
  [1]=>
  string(4) "Coca"
  [2]=>
  string(5) "fanta"
}