<?php $array = ['pepsi','Coca','fanta','pepsi']; $array = array_unique( $array ); var_dump($array);
Standard input is empty
array(3) { [0]=> string(5) "pepsi" [1]=> string(4) "Coca" [2]=> string(5) "fanta" }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!