foreach loop compare arrays and create a new array with only duplicate values
问题 I am using a connection to my database and retrieve dates for each of my roomcodes. The output for the arrays is Array ( [0] => 2020-05-23 [1] => 2020-05-24 [2] => 2020-05-25 [3] => 2020-05-26 [4] => 2020-05-27 [5] => 2020-05-28 [6] => 2020-05-29 [7] => 2020-05-30 [8] => 2020-07-23 [9] => 2020-07-24 [10] => 2020-07-25 [11] => 2020-07-26 [12] => 2020-07-27 [13] => 2020-07-28 [14] => 2020-07-29 [15] => 2020-07-30 [16] => 2020-07-31) Array ( [0] => 2020-05-23 [1] => 2020-05-24 [2] => 2020-05-25