Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

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 will bring theses issues to your attention.


Chapter 15 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 and develops sorting algorithms in PHP. This gives you the
knowledge to code custom sorting functions when the need arises.


Chapter 16 discusses parsing and string evaluation. Much of this chapter is about
regular expressions, a powerful way to describe patterns that are compared to strings.
These are useful for validating user input.


Chapter 17 describes integrating PHP with a database. MySQL is used in the examples
because it's Open Source. Databases allow you to manipulate data in powerful ways and
are necessary for many Web applications.


Chapter 18 is about network issues, such as sending HTTP headers. Because PHP
scripts execute as Web pages, network issues appear frequently.


Chapter 19 explores generating graphics with PHP. It develops examples that create
buttons and graphs dynamically.

Free download pdf