我有一個二維數組,我想知道如何使用PHP進行搜索。我的數組是:搜索組合2D數組值?
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
)
) ]
我希望人們能夠做的是做一個「喜歡」上搜索製造商和型號的綜合價值。也就是說,如果有人搜尋:
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
如果我搜索'png'應該發生什麼??? – shadyyx
可能沒有結果,因爲他說要搜索製造商和型號的綜合價值 – Jeroen