matching identical array data
EDIT: had this problem for a day, searched the net for hours on end, then as soon as I post in here I find the solution
array_unique()
How do you match all data in an array and only output one of each instant?
example
print_r ($some_var);
displays
array ( data1 [0] => data1 [1] => data1 [2] => different [3] => different [4] => data1 [5] )
how do I script to extract only ONE instant of data1 and different ?
assign to a variable, echo each doesnt really matter I suppose, if I know the function to do it I can work from there
I have scoured the net, and php.net though various functions but cant find anything that does exactly this
cheers