Source Code:
(back to article)
<?php $unique_values = ["apple", "banana", "orange"]; if (!array_key_exists("grape", $unique_values)) { $unique_values[] = "grape"; } print_r($unique_values); ?>
Result:
Report an issue