Home>Article>Backend Development> PHP basic learning array operators

PHP basic learning array operators

little bottle
little bottle Original
2019-04-26 17:49:27 3657browse

This article will use a table to tell you about the meaning and usage examples of PHP's array operation operators. It has certain learning value. Interested friends can learn about it. I hope it will be helpful.

Arrays can be operated on data that conforms to the type. Array operations are implemented through array operands. See the table below:

Array operation operators

#<> Not equal $a<>$b; ##!== If Note: "" is a union operator, used to merge arrays. If elements with the same subscript appear, the elements in the first array are retained.
##Operators

Meaning

Example

United

$a $b

; The union of$aand$b

==

Equal

$a==$b;

If$aand$bhave the same key-value pair, thentrue

===

Congruent

$a= ==$b;

If$aand$bhave the same key-value pair and the order and type are the sametrue

!=

Not equal

$a!=$b

; if$ais not equal to$b, thentrue

If

$ais not equal to$b, thentrue

Not congruent

$a!===$b;

$ais not equal to$b, thentrue

Related tutorials:

PHP video tutorial

The above is the detailed content of PHP basic learning array operators. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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