June 2002
Intermediate to advanced
800 pages
16h 3m
English
Functions are the key to reusability. You have already learned to call PHP's built-in functions in this chapter but up to now you have not implemented your own functions. In this section you will learn to build your own PHP functions.
Let's start with a simple example: Gauss's Formula for the sum of integers.
Johann Carl Friedrich Gauss was born on April 30, 1777, in Brunswick, Germany. At the age of seven, Carl Friedrich Gauss started elementary school, and his potential was noticed almost immediately. His teacher, Büttner, and his assistant, Martin Bartels, were amazed when Gauss summed the integers from 1 to 100 instantly by spotting that the sum was 50 pairs of numbers each pair summing to 101. ...
Read now
Unlock full access