how are you doing?
When I use the join() function with duplicated values in an array, the join function returns the array but removing duplicates and I dont want that!
Example:
$array= array(1, 2, 2, 2);
$res = join(',', $array);
I get this:
1,2
but I want the result to be:
1,2,2,2
Hope someone can help me! Thank you
You say this is your code:
In which case, you are not populating the arrays like you think. Your code is doing this:
So only contains 2 values. If you want duplicates, change your code to this: