PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $a = [ ["id" => "123", "label" => "l1"], ["id" => "321", "label" => "l3"] ]; $res = array_combine( array_column($a, 'id'), array_column($a, 'label') ); var_export($res);
Show:  
Copy Clear