Understanding how to manipulate strings in PHP will help you tremendously. It will allow
you to validate user input and extract data from text files in an efficient manner. PHP gives
you an enormous number of functions to manipulate strings—take a look at Table 4.3.
Most of the functions are fairly self explanatory, such as strlen(). But others need a little
bit more attention. printf() and sprintf() are good examples of these; let’s take a closer
look at these two functions.
you to validate user input and extract data from text files in an efficient manner. PHP gives
you an enormous number of functions to manipulate strings—take a look at Table 4.3.
Most of the functions are fairly self explanatory, such as strlen(). But others need a little
bit more attention. printf() and sprintf() are good examples of these; let’s take a closer
look at these two functions.