How to use Concatenating of Two Strings in PHP

PHP

We will show you a simple example which will show you how to concate two string like “First Name” and “Last Name”  with the help of variable or without variable.

Here two string will become a single string and then it will be shown on the front end to the N Number of Users.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>String Variable Concate Example in PHP</title>
</head>
<body>
<h1>
<?php
//This is the Simple example with the string variable concate
$fname = "John";
$lname = "Corner";
echo $fname." ".$lname;

//This is the Simple example with the direct string concate
echo "John"." "."Corner";
//This is just to show how the variable works when the store the string data.

?>
</h1>
</body>
</html>
-->