if() endif alternative syntax

WBOY
Release: 2016-07-25 08:45:56
Original
1344 people have browsed it
  1. if (expression):
  2. ?>
  3. statement
  4. endif
  5. ?>
Copy code

The above writing method is an alternative syntax for PHP process control.
There are several alternative syntaxes in PHP flow control:
if,while,forforeach,switch
The basic form of the alternative syntax is:
Replace the opening brace ({) on the left side of the flow control statement with a colon (:), and the closing brace (}) on the right side can be replaced with endif or endwhile or endfor or endforeach or even endswitch.

endif


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!