Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i want to print the summation of 2 variables & print my name and my id in PHP language

What I have tried:

PHP
<?php

int $a = 5;
int $b = 5;

echo .$a. + .$b;
?>

<?php

name = "Bbbbb";
id = "00000";

echo $name;
echo $id;



?>
Posted
Updated 23-Feb-18 15:06pm
v2
Comments
Patrice T 23-Feb-18 21:04pm    
What is the problem with this code?

1 solution

The syntax should be something like below.

PHP
<?php

$a = 5;
$b = 5;

$name = "Bbbbb";
$id = $a + $b;

echo $name . $id;

?>

Output: Bbbbb10
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900