Home  >  Article  >  Backend Development  >  数组资料操作

数组资料操作

WBOY
WBOYOriginal
2016-06-13 12:38:401121browse

数组文件操作

本帖最后由 lazygc520 于 2013-09-05 13:13:44 编辑 已知数组a和数组b
<br />
$a = array (<br />
 0 => <br />
  array (<br />
    'cust_no' => '310F6 1VA5A',<br />
    'lotno' => '2X15',<br />
    'count' => '0',<br />
  ),<br />
  1 => <br />
  array (<br />
    'cust_no' => '310F6 1VA5A',<br />
    'lotno' => '2Z15',<br />
    'count' => '16',<br />
  ),<br />
);<br />
<br />
$b = array (<br />
  0 => <br />
  array (<br />
    'cust_no' => '310F6 1VA5A',<br />
    'lotno' => '2X15',<br />
    'count' => '0',<br />
  ),<br />
  1 => <br />
  array (<br />
    'cust_no' => '310F6 1VA5A',<br />
    'lotno' => '2Z15',<br />
    'count' => '32',<br />
  ),<br />
  2 => <br />
  array (<br />
    'cust_no' => '310F6 1VA5A',<br />
    'lotno' => '3528',<br />
    'count' => '80',<br />
  ),<br />
);<br />


想要得到的结果是当数组b和数组a的cust_no和lotno都相同时,则提示update table sql
否则insert table sql。请问怎么求?
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