i want to loop an array with foreach to check if a value exist. and if it does, i want to delete that element.
i have following code:
foreach($display_related_tags as $tag_name)
{
if($tag_name == $found_tag['name']);
// DELETE CODE
}
but i dont know how to delete the element once the value is found. how do i do that?
there are maybe other alternatives/functions to do that and you are all welcome to share them. however, i have to use foreach with this one here. thanks.