The PHP Manual

I l @ ve RuBoard

Every PHP programmer should immediately acquire some version of the PHP manual before beginning to work with the language. The manual is available from the official PHP site ”http://www.php.net/docs.php (Figure C.1) ”as well as a number of other locations. You can download the manual in nearly a dozen languages in any of these formats: PDF, HTML, plain text, or Palm-compatible. The official Web site also has an annotated version of the manual available at http://www.php.net/manual/en/ where other users have added helpful notes and comments that may solve some of the problems you encounter when using a particular function.

Figure C.1. The PHP home page has many different versions of the PHP manual available for download. I would recommend saving one version on your computer for quick reference and then checking the online annotated version if you are having problems with a specific function.

graphics/cfig01.gif

The manual begins with installation and security issues. It then continues with basic language constructs and some of PHP's features. The bulk of the manual details PHP's built-in functions, organized by topic. What is not apparent to the beginning PHP programmer is what the format that the manual uses to describe these functions means. Common lines are:

 array file (string filename [, int  use_include_path]) int mysql_close ([int link_identifier]) void exit(void) double round (double val) 

It is important to understand that the first word on each line refers to what type of value the function will return. The file() function returns an array, mysql_close() returns an integer, exit returns nothing, and round() returns a floating-point (or double) number. The manual also lists the arguments (and argument types) that a function takes, with optional arguments listed within square brackets. For example, exit takes no arguments, round() takes a floating-point number and mysql_close() takes an optional link identifier.

I l @ ve RuBoard


PHP for the World Wide Web (Visual QuickStart Guide)
PHP for the World Wide Web (Visual QuickStart Guide)
ISBN: 0201727870
EAN: 2147483647
Year: 2001
Pages: 116
Authors: Larry Ullman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net