0
我有兩個具有完全相同的鍵名但不同的二進制值的數組。我想形成一個數組,其中包含每個數組中的二進制值的邏輯與。PHP執行兩個數組的邏輯AND
如:
$array1 = Array ([Ant] => 1 [Arm] => 1 [Ash] => 1 [AUB] => 0 [Bas] => 1 [Bay]);
$array2 = Array ([Ant] => 1 [Arm] => 0 [Ash] => 1 [AUB] => 1 [Bas] => 1 [Bay]);
$finalArray = ($array1 AND $array2);
//預期的輸出結果是:
$finalArray = Array ([Ant] => 1 [Arm] => 0 [Ash] => 1 [AUB] => 0 [Bas] => 1 [Bay]);
'foreach'&(雙關打算)'&'是喲你的朋友們。 – ccKep