What are the assignment operators in php?

(*-*)浩
Release: 2023-02-23 18:08:01
Original
9207 people have browsed it

What are the assignment operators in php?

PHP assignment operator (Recommended learning: PHP programming from entry to proficiency)

In PHP, basic The assignment operator is "=". It means that the left operand is set to the value of the right-hand expression. In other words, the value of "$x = 5" is 5

##x=yx=y The left operand is set to the value of the right-hand expression x = yx = x yplusx -= yx = x - yMinusx *= yx = x * yMultiply x /= yx = x / yexcept x %= yx = x % y modulo (remainder of division)a .= ba = a . bConcatenate two strings# #The following examples demonstrate different results obtained by using different assignment operators:
operator
is equivalent Described in






















The above is the detailed content of What are the assignment operators in php?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
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!