Home  >  Article  >  Backend Development  >  linq-PHP two-dimensional array search data, how to implement conditional query

linq-PHP two-dimensional array search data, how to implement conditional query

WBOY
WBOYOriginal
2016-10-09 08:31:542344browse

linqphp

Find array:
$roots = array[
0=>[ id =>1, name =>'a', state = 1],
1=>[id =>2, name =>'b'state = 1],
.... 8000 pieces of data are omitted here
];
Query conditions: I want to search based on Name (for example, Name = 'a'). In addition to traversing, there are other Method?
Or is there any ready-made function that can be used? 2. If I search based on the State and Name conditions at the same time, how should I implement it?

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