You do not always know everything about the data with which you are working. Strings can arrive from many sources, including user input, databases, files, and Web pages. Before you begin to work with data from an external source, you often need to find out more about it. PHP provides many functions that enable you to acquire information about strings.
A Note About Indexing Strings
We will frequently use the word index in relation to strings. You will have come across the word more frequently in the context of arrays. In fact, strings and arrays are not as different as you might imagine. You can think of a string as an array of characters. So, you can access individual characters of a string as if they were elements of ...