If
(PHP 4, PHP 5)
The IF structure is one of the most important features in many languages, including PHP, which allows code snippets to be executed on a conditional basis. The IF structure of PHP is similar to the C language:
As defined in the
Discuss why PHP has both ElseIf and else if
these words are in the PHP manual, I am more curious about why PHP will exist at the same time these two ways?
ElseIf, as implied by this name, is the combination of if and else. As with else, it extends
1. If
The IF structure is one of the most important features in many languages, including PHP, which allows code snippets to be executed on a conditional basis. The IF structure of PHP is similar to the C language:
if (expr)Statement
As defined in
This article mainly introduces the PHP process Control elseif/else If, has a certain reference value, now share to everyone, the need for friends can refer to
This paper tries to use the basic Learning Master, please close this page
Read this
PHP ElseIf and else if difference
If, ElseIf, and ELSE statements are used to perform different actions based on different conditions.
Conditional statementWhen you write code, you often need to perform different actions for different
To discuss why PHP will have both elseif and elseif, which are described in the PHP Manual. I'm curious about why PHP will have both? Elseif is a combination of & nbsp; if & nbsp; and & nbsp; else & nbsp. Like & nbsp; else & nbsp;, it extends & nbsp;
If ... Else statement
Use the If....else statement if you want to execute some code when a condition is set up and execute some other code when the condition is not valid.
Grammar
The code is as follows
Copy Code
if
The usage of built-in functions such as if, elseif, and else in the smarty template engine is smartyelseif. The usage of the built-in functions if, elseif, and else in the smarty template engine. This document describes how to use the built-in
This article describes how to use the built-in functions of the smarty template engine, such as if, elseif, and else. It uses two examples to analyze the usage skills of if, elseif, and else. For more information, see
This article describes how to
PHP smarty Template conditional selection structure If-elseif-else,{if} must be paired with {/if}, but you can also use {else} and {ElseIf} clauses, and the following modifiers can be used in {if}:
If instance
{if} instance:
{if $name eq ' Fred '}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.