Displaying Output to Web Pages
Two predefined PHP constructs and two predefined PHP functions are used to display output to web pages. They will be covered in this section along with another function that can convert variables to a formatted output string.
The first construct is the echo() statement. The difference between a function and a construct is that the parentheses are unnecessary in a construct. Moreover, if you want to pass multiple arguments to the echo command, parentheses cannot be used. The echo statement has the following formal definition:
void echo(string arg1 [, string arg2 ... ])
The limitation of the echo() construct is that it returns nothing and therefore cannot be used in a complex expression. Each line that uses the ...