I want to add $variable only if there isn’t a key with the same value in array $insertar["Atributos"].
$insertar["Atributos"][] = $variable;
I can do it using a foreach to check beforehand if $variable is stored and insert only if it isn’t but I want to know if there is an easier way.
To be clear:
I want to add
$variableonly if there isn’t a key with the same value in array$insertar["Atributos"].