Answers for "php concat variable and string"

PHP
2

how to combine variables and text into a string php

<?php
$number = 8;
$txt = "the number is".$number.", ok?"; //Use a dot to combine
echo $txt;
?>
Posted by: Guest on November-01-2020
7

php concat

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

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

how to add two string in php

Remember dot .
Posted by: Guest on August-23-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 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

Code answers related to "php concat variable and string"

Browse Popular Code Answers by Language