Newbie here. I'm trying to make it so if $value doesn't contain two dashes then it is unset from the array. I figured out how to remove items from the array containing only ONE dash, but it needs to contain TWO. Thanks!
Removes items from an array containing only one dash:
foreach ($addkeys as $key=>&$value) {
if (strpos($value, '-') === false) {
unset($addkeys[$key]);
}
}
I also tried $value, '--' and '-''-' without success.