how to mix multiple array in to one array in php

前端 未结 1 1968
无人及你
无人及你 2021-01-29 06:57

I am getting array from database but it creating multiple array. I need only one array from database. Now simply I want to create one array from multiple array.

I got ar

相关标签:
1条回答
  • 2021-01-29 07:37

    You can iterate over the result set to create another array:

    $res = array();
    foreach ($array as $row) {
      $res = array_merge($res, $row);
    }
    
    0 讨论(0)
提交回复
热议问题