integer to string php
return strval($integer);
add two numbers as string in php
$num = "3.14";
$int = (int)$num;
$float = (float)$num;
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