Count occurrences of value in array, return values once


/ Published in: PHP
Save to your folder(s)

I needed to trim a simple numerical array that might have duplicate values into an array with no duplicates. I came up with this before finding array_unique(). D\'oh.

URL: http://www.w3schools.com/php/func_array_unique.asp

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.