匹配變量可以說我有隨機$變量和三個數組:幾個陣列
$array1 = ("one", "two", "three");
$array2 = ("four", "five", "six");
$array3 = ("seven", "eight", "nine");
如何做到這一點:
if $variable is in $array1
echo "in array one";
elseif $variable is $array2
echo "in array two";
elseif $variable is in $array3
echo "in array three";
else
echo "variable isnt in any of arrays";
我希望你有一點,我會很感激的任何幫助,我想一個一個地排列數組,然後preg_matching他們,但我無法弄清楚如何使用多個陣列:)
謝謝配合;)真的很感激 – DadaB