June 11, 2013
Php array duplicates separation
Joshua Fabillar’s Question:
In PHP I have a arrays of id
$ids = array(1, 1, 1, 2, 2, 3, 3);
I just wanted to separate the 1 which will become 1, 1, 1
and 2 become 2, 2
and 3 become 3, 3
.
How can I do that in PHP?