我想在条件中使用两个值搜索多维数组中的键.
我知道如何使用单个搜索条件搜索多维数组:
$key = array_search($journee, array_column($data,'journee'));
Run Code Online (Sandbox Code Playgroud)
但不仅仅是那个.这是我的阵列设置:
Array
(
[0] => Array
(
[pseudo] => titi
[journee] => 11
[pts] => 3
)
...
[10] => Array
(
[pseudo] => test
[journee] => 10
[pts] => 6
)
[11] => Array
(
[pseudo] => test
[journee] => 11
[pts] => 4
)
)
Run Code Online (Sandbox Code Playgroud)
如果我只11输入array_search和array_column输入密钥journee,它将返回0.
我也想添加pseudo搜索条件(键journee和pseudo应搜索特定值).
我怎么做到这一点?