remove item by value from array on button click

[php]function remove_element($arr, $val){
foreach ($arr as $key => $value){
if ($arr[$key] == $val){
unset($arr[$key]);
}
}
return $arr = array_values($arr);
}
[/php]
how can i set a form to remove a item from an array on button click. i have the cde above but cant get it to work with my form

never mind i sorted it

Sponsor our Newsletter | Privacy Policy | Terms of Service