Home > Backend Development > PHP Tutorial > A brief introduction to expressions in PHP, a brief introduction to PHP expressions_PHP tutorial

A brief introduction to expressions in PHP, a brief introduction to PHP expressions_PHP tutorial

WBOY
Release: 2016-07-12 08:50:53
Original
928 people have browsed it

Brief description of expressions in PHP, brief description of PHP expressions

Expression is an important concept in PHP. An expression can be understood as "anything with value" ". In this tutorial, when it comes to the syntax of expressions, we use "expr" to represent expressions.

The following is an expression:

$x > $y;

In the above example, when the value of $x is greater than $y, the expression value is TRUE, otherwise it is FALSE.

We often determine our next step logic by judging the value of an expression (including specific numerical values ​​and Boolean values), such as the following example:

<&#63;php
if ($x > $y) {
echo "x > y";
}
&#63;>
Copy after login

This example uses if logical judgment. The judgment condition is the $x > $y expression in parentheses. If $x > $y is true (TRUE), then the words "y > x" will be output. Of course, the actual situation is much more complicated.

Expressions are widely used in our PHP programming.

The above content is the expression in php introduced by the editor to you. I hope it will be helpful to you!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1133050.htmlTechArticleA brief description of expressions in PHP, a brief description of PHP expressions Expression is an important concept in PHP, you can Think of an expression as "anything with a value". In this tutorial, expressions are involved...
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