but if there would be dublicate values in the array,
how can I remove only one variable with the specified value?
I made something like this: but it isn't enough automatic as i would want it to be.
first i count the variables that have the specified value, in this case "tool"
$count = array_search("tool",$basket);
foreach ($basket as $key => $value) {
if ($value == 'tool') {unset ($basket[$key]);}
}
and now i would add variables into the array, so that in the end it would seem that just one variable was removed
if($hulk = 2) {
array_push($korv,"tool"); }