If you read the PHP Manual entry NogDog linked to, you will find that:
"Typically, funcname takes on two parameters. The array parameter's value being the first, and the key/index second."
So, you cannot use say, htmlspecialchars() directly, but have to wrap it in another function, e.g.,
array_walk($_POST, create_function('&$value,$key', '$value = htmlspecialchars($value);'));
Of course, this is not a good example since you cannot be sure that $_POST is a single dimensional array.