Q:

How append a string in PHP

0

How append a string in PHP

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Use the PHP String Operators

There is no specific function to append a string in PHP. But you can use the PHP concatenation assignment operator (.=) to append a string with another string.

Let's check out the following example to understand how it basically works:

<?php
$a = "Hello";
$a .= " World!";
echo $a; // Outputs: Hello World!
?>

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

PHP  and MySQL Frequently Asked Questions

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
How to extract substring from a string in PHP... >>
<< How to prepend a string in PHP...