I have a collection which I want to iterate and modify while I fetch some of its elements. But I could\'t find a way or method to remove that fetched element.
If you know the key which you unset then put directly by comma separated
unset($attr['placeholder'], $attr['autocomplete']);