I am novice in php development and I need your help.
I have read the column of a file and I want to keep in an array only the distinct values
I do it with this code in a while (fgetcsv) loop
$sex_array = array();
isset($sex_array[$sex])?$sex_array[$sex]++:$sex_array[$sex]=1;
my array is in format Array ( [man] => 33 [woman] => 141 )
How can I make a variable and when I print it to take man:33,woman:141
I tried implode but I take 33,141