PHP |
Values |
Operators |
Functions |
Arrays |
Forms |
Sessions-Cookies |
Classes
A string value is a series of letters, numbers, or symbols defined as text characters. String values are declared within ' ' quotes. The " " double quotes allow variable substitution and escape operators. The \ backslash is the escape operator. Single quotes are like double quotes, but do not allow variable substitution or escape operators, except the \ to escape the \ and ' operators. XHTML tags are coded within strings to be passed to the browser...
The output to the browser is...
String
Text
These are escape operators for double quotes...
\" substitutes "
\\ substitutes \
\$ substitutes $
\n line break (for code view or email headers)
The output to the browser is...
String "Text"
String Text
Here's More String Text
A numeric value is an integer or decimal number, declared without quotes...
The output to the browser is...
2
A boolean value is declared as either true or false, declared without quotes....
An array value stores multiple text or numeric values...
A null value is devoid of any value, declared without quotes.
An object value stores variables and functions as properties and methods. Objects, known as classes, are associated with object-orientated programming. Tutorials for PHP classes are on the Classes page.