sum two numbers in php
<?php
$x=10;
$y=20;
$z = $x + $y;
echo "Sum of x and y : ". $z;
?>
sum two numbers in php
<?php
$x=10;
$y=20;
$z = $x + $y;
echo "Sum of x and y : ". $z;
?>
Adding string with number in php
$a = "3dollars";
$b = 20;
echo $a += $b;
print($a += $b);
------------------------------
It casts '3dollars' as a number, getting $a = 3.
When you echo, you add 20, to $a, so it prints 23 and $a = 23.
Then, when you print, you again add 20, so now $a = 43.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us