Search
 
SCRIPT & CODE EXAMPLE
 

PHP

PHP Concatenate String

$var1 = "hello";
$var2 = "world";

$concat = $var1.' '.$var2; // $concat ='hello world' (with single quote)

$concat = "$var1 $var2"; // $concat ='hello world' ( with double quote)
Comment

String Concatenation in PHP

phpCopy<?php
$mystring1 = "This is the first string. ";
$mystring2 = "This is the second string";
$finalString = sprintf("%s %s", $mystring1, $mystring2);
echo($finalString);
?>
Comment

concatenate string php

<?php 

// First String 
$a = 'Hello'; 

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

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

// print Concatenate String 
echo " $c 
"; 
?> 
Comment

String Concatenation in PHP

phpCopy<?php
$mystring1 = "This is the first string. ";
$mystring2 = "This is the second string.";
$finalString = $mystring1 . $mystring2;
echo($finalString);
?>
Comment

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.";

$finalString = $mystring1 . $mystring2 . $mystring3 . $mystring4 . $mystring5;
echo($finalString);
?>
Comment

php string concatenation

<?php
 
// First String
$a = 'Hello';
 
// Second String
$b = 'World!';
 
// Concatenation Of String
$c = $a.$b;
 
// print Concatenate String
echo " $c 
";
?>
Comment

php how to concatenate strings

$data1="The colour is ";
$data2="red";

$result=$data1.$data2; // The colour is red
Comment

merge strings in php

$merge = "Hello" . " World!";
Comment

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);
?>
Comment

php string concat

$name [] = ['abhi']
Comment

String Concatenation in PHP

phpCopy<?php
$mystring1 = "This is the first string. ";
$mystring2 = "This is the second string.";
$mystring1 .= $mystring2;
echo($mystring1);
?>
Comment

PREVIOUS NEXT
Code Example
Php :: include JS or Css in wordpress plugin 
Php :: fixing unclosed html tags 
Php :: array_diff php 
Php :: pass data to blade laravel 
Php :: laravel get route action 
Php :: laravel get query result as array 
Php :: post rest drupal 
Php :: pessimistic locking laravel 
Php :: how to create route in laravel 
Php :: Detect Mobile Platform On Php 
Php :: Magento 2 create admin module 
Php :: laravel crud application 
Php :: laravel link to css or image 
Php :: how to delete a row in phpmyadmin 
Php :: country list laravel 
Php :: how to run php on windows 
Php :: doctrine where 
Php :: Generate Laravel Migrations from an existing database 
Php :: pagination javascript php 
Php :: move wordpress to new server 
Php :: php ?? operator 
Php :: php array lenght 
Php :: php locale 
Php :: php code generator 
Php :: preg_match in php 
Php :: laravel return redirect back with input except one filed 
Php :: add class to li 
Php :: creating custom database 
Php :: laravel create multiple request 
Php :: cake php 2.x sql dump 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =