Part III: Algorithms
An algorithm is a recipe for solving a problem. This section discusses broad problems in computer science and how to solve them, all in the context of PHP. These problems are inherent in any programming endeavor, but in most cases PHP makes handling them easier. However, the particular circumstances of the Web offer the seasoned programmer a new set of challenges. This section brings these issues to your attention.
Chapter 21 examines sorting and searching, along with a related topic, random numbers. Although PHP has built-in functions for sorting data, this chapter explores the theory behind sorting. This gives you the knowledge to code custom sorting functions when the need arises.
Chapter 22 discusses parsing and string ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access