How to unset (remove) a collection element after fetching it?

后端 未结 5 1407
被撕碎了的回忆
被撕碎了的回忆 2020-12-08 18:28

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.



        
5条回答
  •  自闭症患者
    2020-12-08 18:46

    If you know the key which you unset then put directly by comma separated

    unset($attr['placeholder'], $attr['autocomplete']);
    

提交回复
热议问题