What are some potential pitfalls when using arrays in PHP, especially when trying to store unique values?

When using arrays in PHP to store unique values, a potential pitfall is that traditional array functions like `array_push` or `[]` may not prevent duplicates from being added. To ensure uniqueness, you can use the `array_unique` function after adding elements to the array.

$uniqueValues = [];
$newValue = "uniqueValue";

// Add value to array
$uniqueValues[] = $newValue;

// Remove duplicates
$uniqueValues = array_unique($uniqueValues);