Answers for "php concat string"

PHP
1

php mixing 2 string

<?php
$a = "Hello ";
$b = $a . "World!"; // now $b contains "Hello World!"

$a = "Hello ";
$a .= "World!";     // now $a contains "Hello World!"
Posted by: Guest on March-09-2021
6

php append string

<?php
$a = "Hello ";
$b = $a . "World!"; // now $b contains "Hello World!"

$a = "Hello ";
$a .= "World!";     // now $a contains "Hello World!"
?>
Posted by: Guest on February-12-2020
8

php concat

$a = "hello";
$b = "world";
$c = $a . " " . $b;

echo $c; // hello world
Posted by: Guest on February-24-2020
4

concatenate string php

<?php 

// First String 
$a = 'Hello'; 

// Second String 
$b = 'World!'; 

// Concatenation Of String 
$c = $a.$b; 

// print Concatenate String 
echo " $c \n"; 
?>
Posted by: Guest on May-08-2020
1

String Concatenation in PHP

phpCopy<?php
$mystring1 = "This is the first string. ";
$mystring2 = "This is the second string. ";
$mystring3 = "This is the third string. ";
$mystring4 = "This is the fourth string. ";
$mystring5 = "This is the fifth string.";

$mystring1 .= $mystring2 .= $mystring3 .= $mystring4 .= $mystring5;
echo($mystring1);
?>
Posted by: Guest on April-23-2021
0

php concat variable and string

<?php
  $name = "Paul";	
  $age = 26;

  echo "My name is {$name}, I'm {$age} years old ";
Posted by: Guest on March-24-2021

Browse Popular Code Answers by Language