HomePHP Cleaning up Array Elements, POST and GET Requests with Filters in PHP 5
Cleaning up Array Elements, POST and GET Requests with Filters in PHP 5
Welcome to the final episode of a series that shows you how to use filters in PHP 5. Made up of nine parts, these articles show you how to utilize the numerous checking filters that come with the filter library. You can use them to thoroughly validate the incoming data handled by your PHP programs, without having to spend a long time coding custom functions or class methods.
Naturally, if youíve been a patient reader and already went through the preceding articles of the series, Iím certain that at this point youíll have a solid background in using the filter extension for checking common data types, including email and IP addresses, integers and float numbers, and so forth. In those tutorials I explained how to accomplish all of these tasks with a decent variety of code samples.
Regardless of the features mentioned before, one of the most robust aspects of the filter library is its ability to sanitize strings, something that was covered in depth in the previous chapter. However, the library is also capable of cleaning up strings in arrays, as well in data coming from GET and POST requests and cookies. Therefore, this final article of the series will demonstrate how to do this with a few understandable examples, in this manner concluding this quick introduction to working with the PHP 5 filter library.
So, are you ready to tackle the last episode of this educational journey? Then donít waste more time; start reading now!