How to remove empty element in an array : <p>I have been trying array_filter but doesn't work on my part. </p>

<p><a href="https://i.stack.imgur.com/kV2nF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kV2nF.jpg" alt="enter image description here"></a></p>
