我有一个二维数组,我想知道如何使用 PHP 搜索它。我的数组是:
Array (
[0] => Array (
[Image] => 1.png
[Manufacturer] => Manu1
[Model] => Model1
)
[1] => Array (
[Image] => 2.png
[Manufacturer] => Manu2
[Model] => Model2
)
[2] => Array (
[Image] => 3.png
[Manufacturer] => Manu3
[Model] => Model3
)
) ]
我希望人们能够做的是对制造商和型号的组合值进行“LIKE”搜索。即,如果有人搜索:
Ma = Would return all
Mo = Would return all
Manu3 = Would return Manu 3 Model3
Manu2 Mo =Would return Manu 2 Mo'XXXX'
Model1 = Would return Manu 1 Model 1