PROGRAMMING

  MINTE9
REMEMBERS




Last update:   18-05-2022

Concatenation

Concatenation operator concatenate right and left arguments.
 
$a = "a"; 
$b = "b";

echo $a . $b; // ab
PHP has a special operation that can be used to concatenate two strings.
 
$a = "a";
$b = "b";

echo $a .= $b; // ab

# Using the + operator, like in Java ...
# will result in TypeError (PHP 8+)

echo $a += $b; // Unsupported operant types

Questions     github Operators
Comparison
        A B C D E F
🔔
1/3