How can I iterate a multidimensional array and filter on string nodes? I’m trying to create an easy way to sanitize data coming into my application via POST and think this would be really handy.
How can I iterate a multidimensional array and filter on string nodes? I’m trying
Share
You can use a recursive function to traverse the array and filter its string components. For example: