16.6 Expressions

Team-Fly    

 
Webmaster in a Nutshell, 3rd Edition
By Robert Eckstein, Stephen Spainhour
Table of Contents
Chapter 16.  PHP

16.6 Expressions

An expression is the basic building block of the language. Anything with a value can be thought of as an expression. Examples include:

 5 5+5 $a $a==5 sqrt(9) 

By combining many of these basic expressions, you can build larger, more complex expressions.

Note that the echo statement we've used in numerous examples cannot be part of a complex expression because it does not have a return value. The print statement, on the other hand, can be used as part of complex expressionit does have a return value. In all other respects, echo and print are identical: they output data.


Team-Fly    
Top


Webmaster in a Nutshell
Webmaster in a Nutshell, Third Edition
ISBN: 0596003579
EAN: 2147483647
Year: 2002
Pages: 412

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