8

How append a string in PHP

 1 year ago
source link: https://www.laravelcode.com/post/how-append-a-string-in-php
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How append a string in PHP

  1327 views

  2 years ago

PHP

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!
?>

i hope you like this small article.

Author : Harsukh Makwana
Harsukh Makwana

Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK