At whatever point you have to avoid copy values from a one-dimensional array in PHP and you can take after with offered code to get one of a kind values in an avoid.

array_unique() method are utilized to avoid copy information from given array. Utilizing this situation it will keep first appearance data value in an array and removed other upcoming same value.

Two parameters which will be pass into array_unique() method to perform duplication discovering process, first determining an array which is required to filter and second one is optional indicating sorting type.

possible values optional parameters sorting type are:

  • SORT_STRING – Default

Leave a Reply

Your email address will not be published. Required fields are marked *