Menu

Add Topic

Forum

waiting answer July 28, 2021

How to append a string in PHP

Answers
June 10, 2021

The PHP concatenation assignment operator (.=) is used to append a string.

Let's check the following example to understand how this function actually works.

     <?php
        $str = "Welcome to ";
        $str .= "America";
        echo $a; // Outputs: Welcome to America
     ?>

0 0

Please Login to Post the answer

Leave an Answer