How to remove duplicate values in PHP? [duplicate]
问题 This question already has answers here : How to remove duplicate values from an array in PHP (23 answers) Closed 6 years ago . I need help. Want to remove duplicate values from array in php. $categoryTotal echoes 144 125 262 108 351 177 266 269 270 268 309 144 125 262 238 108 On using: vardump() I get Array ( [0] => 144 [1] => 125 [2] => 262 [3] => 108 [4] => 351 [5] => 177 [6] => 266 [7] => 269 [8] => 270 [9] => 268 [10] => 309 [14] => 238 ) I used sort to sort the values in ascending order