Answers for "php concatenate and add"

PHP
7

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
0

php concatenate and add

this is inside for or foreach loop

# For concatenate use           .=
 $var .= 'string';

 # For adding the VALUES use    +=
 $var += 1;
Posted by: Guest on March-23-2021

Code answers related to "php concatenate and add"

Browse Popular Code Answers by Language