← CodePrimer
PHP Beginner Basics

Combined assignment operators

What does += mean in PHP?

+= -= .= shortcuts.

Sample
<?php
$total = 10;
$total += 5;      // 15
$label = 'Web';
$label .= ' App'; // Web App

Notes

.= concatenates strings in place.

Keywords: += · -= · .= · assignment

Related

Need more coins?

You do not have enough coins for this action.

Your balance: 0 coins

Share