array flat php
$c = ["a" => ["x" => "X", "y" => "Y"], "b" => ["p" => "P", "q" => "Q"]];
print_r(array_merge(...array_values($c)));
Array
(
[x] => X
[y] => Y
[p] => P
[q] => Q
)
$a = [[10, 20], [30, 40]];
$b = [["x" => "X", "y" => "Y"], ["p" => "P", "q" => "Q"]];
print_r(array_merge(...$a));
print_r(array_merge(...$b));
Array
(
[0] => 10
[1] => 20
[2] => 30
[3] => 40
)
Array
(
[x] => X
[y] => Y
[p] => P
[q] => Q
)
Also in PHP:
- check the type of the variable in php
- 500 server error laravel
- alterar dado tabela laravel
- _e in wordpress
- check if string has certain character php
- change max_execution_time php
- datetime print format php
- clear cache command in laravel
- clear app cache laravel
- codeigniter 3 update
- data type checking php
- display folder contents php
- detect find char in string php position
- delete all laravel cache
- Auth::logout in laravel 8
- SSL operation failed with code
- clear cach laravel
- find position of character in string php
- axios post php
- Detect a users location by their IP Address manual php
- find a specific word in a string and add another string after that specific word php
- create table modal and seeder at once in laravel
- clearing the cache in php
- display file error php