remove duplicate values from different array php -
I have an issue to remove duplicate entries from three different arrays. Let me create the structure of an array The array ('table_id' = & gt; array (1 = & gt; '1', 2 = & gt; '1', 3 = & gt; 1 ', 4 = & nbsp; Gt; 1 ', 5 = & gt; 1', 6 = & gt; '1', 7 => '1', 8 = & gt; '1', & lt; - this entry is' 1 ': 14 = & gt; 1', 17 = & gt; '1', 20 = & gt; '1', & lt; - In this entry, the value is' 1 ': 21 = & gt; 1' , 25 = & Gt; 1 ', 28 = & gt; 1', & lt; - this entry has the value '1' :), 'no_of_seats' = & gt; array (1 = & gt; 2' , 2 = 2, 4 = & gt; 2 ', 4 = & gt; 2', 5 = & gt; 2 ', 6 = & gt; 4', 7 = & gt; 4 '4' is the value in this entry: 14 = & gt; 8 ', 17 = & gt; 2', 20 = & gt; 4 ' , & Lt; - This entry has the value '4': 21 = & gt; 8 ', 25 = & gt;' 6 ', 28 = & gt; 4', & lt; - In this entry, 4 'is :),' dt_time_slot '= & gt; array (1 = & gt; 4:30 ', 2 = & gt; 6:30', 3 = & gt; 9:00 ', 4 = & gt; '17: 00', 5 = & gt; '23: 00 ', 6 = & gt; '0:30', 7 = & gt; 1:30 ', 8 = & gt; 4:30', & lt; - Value in this entry '4:30' is: 14 = & gt; '4:00 ', 17 = & gt; 19: 00', 20 = & gt; 4:30 ', & lt; - The price is '4:30' in this entry: 21 = & gt; '6:30', 25 = & gt; '7:30', 28 = & gt; '4:30', & lt; - The value is '4:30' in this entry :)); Array ('table_id' = & gt; array (1 = & gt; '1', 2 = & gt; ' array (1 = & gt; 4:30', 2 = & 6; 6:30 ', 3 = & gt; 9: 1:30 ', 8 = & gt; 4: 30', & lt; - The value in this entry is' 4:30 ': 14 = & gt; 4:00', 17 = & gt; 19: 00 ', 21 = & gt; 6:30', 25 = & gt;; 7:30 ',));
The actual duplicate means that the same key of all three different arrays is 1,2,3, .... 14, .... 25. What should I do that should not have the same value in the same key from the three arrays ... if they are equal then I mark it as a duplicate ..
What do I need from three different arrays Duplicate entries are to be removed (duplicate entries can be more than 3. This time its 3.) and keep only one value.
Please tell me how I can do this.
you array_unique
$ array ['table_id'] = array_nank ($ array ['table_id']); $ Array ['no_of_seats'] = array_nank ($ array ['no_of_seats']); ... etc
Comments
Post a Comment