You check if it’s there, using in_array, before pushing.
foreach($something as $value){
if(!in_array($value, $liste, true)){
array_push($liste, $value);
}
}
The ,true enables “strict checking”. This compares elements using === instead of ==.