$skillsarray = ["php","java","ios","php","php","php","php","java","java","ios"];
$cityarray = ["Chennai","Theni","Theni","Mumbai","Chennai","Theni","Chennai","Hyderabad","Theni","Madurai"];
If I used array_unique
for $skillsarray
, getting result as
["php","java","ios"]
If I used array_unique
for $cityarray
, getting result as
{"0":"Chennai","1":"Theni","3":"Mumbai","7":"Hyderabad","9":"Madurai"}
Can anyone explain why the array_unique($cityarray)
is producing dictionary result?