String Operators [#23] Code Dynamic Websites with PHP

2,701 views · Published 19 July 2014 · 7:01 · Indexed 25 September 2026

Channel: Brad Hussey · 2014 · Education

Watch on YouTube

Lecture 23: String Operators

This one's nice and simple: there are only two string operators. The first one is called the concatenation operator ".", which combines the value of the right argument with the left argument. Let's look at it like this:

$a = "Hola ";

$b = $a . "Mi Amigos!";

echo $b; // This prints "Hola Mi Amigos!"

The second operator is the concatenating assignment operator ".=", which appends the value in the right with the value in the left, like this:

$a = "Hola ";

$a .= "Mi Amigos!";

echo $a; // This prints "Hola Mi Amigos!"

The concatenating assignment operator is considered an "Assignment Operator" which we will be learning more about in the next lecture.

DOWNLOAD COURSE FILES HERE
http://www.bradhussey.ca/download-php-course

More from this channel