Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites
Conclusion Hopefully this chapter has convinced you of the power of PHP. You have seen some of the major features of the languag ...
Chapter 2. VARIABLES, OPERATORS, AND EXPRESSIONS Everything in PHP is either an identifier or an operator. An identifier can be ...
textual data. String constants are always surrounded by double quotes (") or single quotes ('). In addition to these, PHP has fo ...
...
...
When AverageTemperature is first used, PHP marks it internally as a string because it is assigned the value of a string literal. ...
You do not need to let PHP know about a variable before you use it. Some languages like C require you to declare every variable ...
explicitly tell PHP you want a global variable to be present in the function. Listing 2.2 uses the metaphor of the United States ...
...
Listing 2.3 will print out a table with 10 rows. Each row will alternate background colors between an intense green and a lighte ...
your PHP script. Put a linefeed where a linefeed would appear if you were coding the page without PHP. You will spend less time ...
Retrieving Values To use the value stored in a variable, use it anywhere where a value is required, such as the argument to a fu ...
Freeing Memory Each time you create a variable, system memory is set aside for it. Although there is a limit to the memory avail ...
constant may never be used on the left side of an assignment operator. Constants ignore scope and are therefore visible inside f ...
++ (^) Increment -- (^) Decrement Addition, subtraction, multiplication, and division are familiar concepts. They may be applied ...
< (^) Is Less Than (^) Is Greater Than <= (^) Is Less Than or Equal To = (^) Is Greater Than or Equal To == (^) Is Equal ...
See Table 2.8 for an example of a bitwise operation, which shows that (12 & 10) == 8. Matching bits are operated on. In the ...
$ (^) Reference a Variable & (^) Reference Variable Storage -> (^) Reference a Class Method or Property => (^) Set Arg ...
The dollar-sign operator may operate on the result of another dollar-sign operator. In the simplest case a variable holds the na ...
instantiated class; the right-hand side is the name of a function or variable inside the class. Listing 2.10 Using Variables to ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf