How append a string in PHP?

How append a string in PHP?

Asked on November 1, 2018 in PHP.
Add Comment

  • 1 Answer(s)

    Here the PHP String Operators are used.
        There is no specific function to append a string in PHP. But the PHP concatenation assignment operator (.=) is used to append a string with another string.

    For example:

    $a = "Hello";
    $a .= " World!";
    echo $a; // Outputs: Hello World!
    Answered on November 1, 2018.
    Add Comment

  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.