Home  >  Article  >  Backend Development  >  Example of php implementing combined traversal of two multi-dimensional arrays

Example of php implementing combined traversal of two multi-dimensional arrays

黄舟
黄舟Original
2017-10-31 09:05:421705browse

The following editor will bring you an example of combined traversal of two multi-dimensional arrays in PHP. The editor thinks it is quite good, so I will share it with you now and give it as a reference for everyone. Let’s follow the editor and take a look.

The examples are as follows:

$res = $this->LoanRecord->searchloan($conditions,$columns,$page,$this->num,$user_id);
 foreach ($res[1] as $key => $value) {
  if(!empty($value['b']['id'])){
   $result_day = $this->LoanRecord ->getLastDay($value['b']['id']);
   $res[1][$key]['m'] = $result_day['m'];
  }
 }

Export table Separate query, separate query traversal when writing to excel

The above is the detailed content of Example of php implementing combined traversal of two multi-dimensional arrays. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn