php - How to group an array containing strings? -


I have an array that has a string and I need a group accordingly. Please advise.

  array ([0] => string 1 [1] => string 1 [2] => string 2 [3] => string 2 [4] ] =   

I need output as follows:

string1
string2
string3

How can I get it?

," green "," blue "," red "); $ Result = array_unique ($ input); Print_r ($ result); ? & Gt; From

to: http://in3.php.net/array_unique

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -