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.
Also in PHP:
- duplicated items in array php
- check is home page
- In Connection.php line 664:SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema
- create model, controller and migration in single command laravel
- angular post phph
- !strpos() php
- enable error reporting in php
- array unique in php using a column
- clear cache migration laravel
- clear cache laravel ubuntu terminal
- associative array in one key in value must unique in array check in php
- arr::plunk laravel
- ->sale_price
- check composer php verison
- Class 'App\Http\Controllers\Session' not found
- clean url laravel CACHE
- Stored Procedures in Laravel
- Notice: Undefined variable: _SESSION in C:\xampp\htdocs\practice\header.php on line 7
- array_push in php
- delete seed laravel
- check an string incudes a string php
- convert string to timestamp php
- $mpdf
- create a database seeder function