A string and an integer value are added, and the result is an integer value. : String Concatenation « String « PHP






A string and an integer value are added, and the result is an integer value.

 
<?php

$a="5";
$b= 7 + $a;
echo "7 + $a = $b";
?>
  
  








Related examples in the same category

1.A period (.) character is used to combine two separate variables into a single string
2.Combining a string and a number
3.Concatenating strings together
4.Concatenation operator ('.')
5.Joining and Disassembling Strings