Concatenating Two Strings in PHP

Q

How To Concatenate Two Strings Together?

✍: FYIcenter.com

A

You can use the string concatenation operator (.) to join two strings into one. Here is a PHP script example of string concatenation:

<?php 
echo 'Hello ' . "world!\n";
?>

This script will print:

Hello world!

 

Comparing Two Strings in PHP

Assigning a New Character in a String in PHP

Understanding PHP String Literals and Operations

⇑⇑ PHP Tutorials

2016-10-13, 1745🔥, 0💬