search

Home  >  Q&A  >  body text

How to select the array data you want when the filter conditions are uncertain

The front end randomly submits 4 types of data a b c d


a needs to be compared with ==


b c d Use the greater than sign to compare


The conditions submitted by the front end are not sure every time. It may be array(a,b,c,d) or array(a,b ), or array(a); Several conditions are possible


The background needs to compare arrays. This array is found in the database, array(array(a=> 2,b=>3,c=>4,d=>6),array(=>4,b=>5,c=>6,d=>7)) This is a The array in the two-dimensional array is an array that each has a b c d

No need to query the database and only use php to filter the array


PHP中文网用户-7935548PHP中文网用户-7935548426 days ago518

reply all(0)I'll reply

No reply
  • Cancelreply