In drupal we have check_plain function to filter the unwanted codes from a text, I have an array which I am storing directly, in that case, I need to check each value before storing, is there a function to which we can pass the array and it should filter and reset the array.
Ex - I have a form where users can add as many names as they want using (multiple textfield) the name of the textfield is - guarantors
So I have an array where all the userinput is there, inorder to filter, I need to filter each value of array using foreach.
is there a function or way, so that I can directly pass the array to a function and it should return me an array with safe values, i.e each values should be parsed using check_plain function.
I think an expample may help you answer better, here is my example array.
Array (  => Array ( [keyword] => lucidus [color] => #00ff00 )  => Array ( [keyword] => commoveo [color] => #998899 )  => Array ( [keyword] => dolus [color] => #ff0099 ) )
NOTE :: keyword and color are user input values. And those needs to be filtered, it is and can be a multidimensional array.