How to remove duplicate values from Array in PHP?By Hardik Savani | July 14, 2016 | | 995 Viewer | Category : PHP
It is pretty simple to delete duplicate values from PHP Array. But sometimes we confuse for how can we remove. But PHP provide pre-define function array_unique that can help to remove duplicate values from Array.
array_unique() through we can get only unique value from array. So, you can see bellow example i have 34 value two times but when i use array_unique() then it will return only unique value as bellow output:
$myArray = [11,34,56,78,34];
$myArrayNew = array_unique($myArray);
 => 11
 => 34
 => 56
 => 78
- How to create Pagination using dirPagination directive in Angularjs example with demo ?
- How to get gravatar image from email using Jquery?
- How to upgrade node.js version in Ubuntu?
- How to remove # from URL in AngularJS?
- How to change Bootstrap Datepicker with specific date format?
- Simple Add remove input fields dynamically using jquery with Bootstrap
- How to use DB transactions in laravel 5?
- How to solve 'There are no commands defined in the "cashier" namespace' in Laravel 5