??? The closing identifier must begin at the very beginning of a line. It cannot be
preceded with spaces or any other extraneous character. This is a commonly
recurring point of confusion among users, so take special care to make sure
your heredoc string conforms to this annoying requirement. Furthermore, the
presence of any spaces following the opening or closing identifier will produce
a syntax error.
Heredoc syntax is particularly useful when you need to manipulate a substantial
amount of material but do not want to put up with the hassle of escaping quotes.
Control Structures
Control structures determine the flow of code within an application, defining execution
characteristics such as whether and how many times a particular code statement
will execute, as well as when a code block will relinquish execution control. These
structures also offer a simple means to introduce entirely new sections of code (via
file-inclusion statements) into a currently executing script. In this section you??™ll learn
about all such control structures available to the PHP language.
Conditional Statements
Conditional statements make it possible for your computer program to respond
accordingly to a wide variety of inputs, using logic to discern between various conditions
based on input value. This functionality is so basic to the creation of computer
software that it shouldn??™t come as a surprise that a variety of conditional statements
are a staple of all mainstream programming languages, PHP included.
Pages:
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184