Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこの形式の配列を持っています
Array ( [0] => 8 [1] => 2 [2] => 10 [3] => 11 [4] => 19 [5] => 13 [6] => 10 )
このフォームに価値を内破したい[0,8],[1,2],[2,3],[3,11],[4,19],[5,13],[6,10]。これを行う組み込みのphp関数はありますか?
[0,8],[1,2],[2,3],[3,11],[4,19],[5,13],[6,10]
$new_arr = array_map(null, array_keys($arr), $arr);
$out = array(); foreach($array as $k => $v) {array_push($out, array($k, $v)); }