PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php // $x = ['x', 'y', 'z']; // $y = ['a', 'b', 'c']; // $goal = []; // array_push($goal, $x, $y); // print_r($goal); $fl1 = "aa;bb;cc"; $fl2 = "dd;ee;ff"; $f1 = explode(";",$fl1); $f2 = explode(";",$fl2); $id =2; // echo count($f1).'<br>'; $data = array(); for ($i=0;$i<count($f1);$i++) { $data += array($f1[$i] => $f2[$i]); } $data += array("id" => $id); print_r($data);
Show:  
Copy Clear