CHAPTER 6Working with Strings

Considered pretty much a staple of any programming language, the ability to work with, maneuver, and ultimately control strings is an important part of a daily programming routine. PHP, unlike other languages, has no trouble using data typing to handle strings. Thanks to the way PHP is set up—that is to say, that when a value is assigned to a variable, the variable automatically typecasts itself—working with strings has never been easier. PHP 5 has not done much to improve upon, or modify, the way strings are handled in PHP itself, but it has provided you with new and improved class functionality so you can more readily create tools to help support PHP's somewhat clunky string function naming conventions.

This chapter's ...

Get PHP 5 Recipes: A Problem-Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.