Subject: PHP

Remove Duplicate Elements

Write a PHP function to remove duplicate elements from an array without using array_unique().

Example:
Input: [1, 2, 2, 3, 4, 4, 5]
Output: [1, 2, 3, 4, 5]

Select file or drag and drop

PNG, JPG, SVG

Preview