I have 2 arrays
我有2个阵列
I'm trying to find the difference between them.
我正试图找出它们之间的区别。
I want to know what is the value that in array2 that array1 don't have, and vice of versa.
我想知道array1中没有的array2中的值是什么,反之亦然。
I've tried
$array_intersect = array_intersect(array_values($collections_code),array_values($languages_code));
$array_diff = array_diff(array_values($collections_code),array_values($languages_code));
dd(
'array_intersect : --------- ',$array_intersect,
'array_diff : --------- ',$array_diff
);
2 Arrays
array1
array:312 [▼
0 => "h"
1 => "p1"
2 => "p2"
3 => "modify"
4 => "more_settings"
5 => "on"
6 => "off"
7 => "day_0"
8 => "day_1"
9 => "day_2"
10 => "day_3"
11 => "day_4"
12 => "day_5"
13 => "day_6"
14 => "minutes"
15 => "hours"
16 => "day"
17 => "days"
18 => "wifi_err"
19 => "wifi_private_1"
20 => "wifi_private_2"
21 => "wifi_private_3"
22 => "wifi_private_4"
23 => "wifi_private_5"
24 => "wifi_private_6"
25 => "wifi_private_7"
26 => "wifi_guest_1"
27 => "wifi_guest_2"
28 => "wifi_guest_3"
29 => "wifi_guest_4"
30 => "wifi_guest_5"
31 => "wifi_guest_6"
32 => "wifi_guest_7"
33 => "wifi_guest_8"
34 => "wifi_guest_9"
35 => "wifi_info_bar"
36 => "wifi_info_1"
37 => "wifi_info_2"
38 => "wifi_info_3"
39 => "wifi_info_6"
40 => "wifi_status"
41 => "firewall_11"
42 => "wifi_settings_h"
43 => "wifi_guest_bar"
44 => "private_h"
45 => "private_p"
46 => "private_bar"
47 => "private_3_tip"
48 => "private_4"
49 => "private_4_tip"
50 => "private_6"
51 => "private_7"
52 => "guest_bar"
53 => "guest_2"
54 => "guest_3"
55 => "guest_4"
56 => "guest_5"
57 => "guest_6"
58 => "guest_12"
59 => "guest_13"
60 => "guest_14"
61 => "login_1_1"
62 => "login_1_2"
63 => "login_1_3"
64 => "login_1_4"
65 => "login_2"
66 => "login_2_1"
67 => "login_2_2"
68 => "login_2_3"
69 => "login_2_4"
70 => "login_2_5"
71 => "login_4"
72 => "firewall_12"
73 => "firewall_13"
74 => "private_1"
75 => "guest_1"
76 => "private_3"
77 => "guest_7"
78 => "wifi_private_2"
79 => "guest_9"
80 => "guest_10"
81 => "guest_11"
82 => "login_1"
83 => "guest_8"
84 => "private_5_tip"
85 => "private_2"
86 => "login_bar"
87 => "login_2_desc"
88 => "wifi_guest_3"
89 => "login_3"
90 => "wifi_guest_5"
91 => "wifi_guest_6"
92 => "wifi_guest_7"
93 => "wifi_guest_8"
94 => "login_3_desc"
95 => "promotion_manager_bar"
96 => "promotion_heading"
97 => "promotion"
98 => "current_promotions"
99 => "promotion_name"
100 => "promotion_status"
101 => "promotion_actions"
102 => "promotion_preview"
103 => "promotion_add"
104 => "bandwidth_3"
105 => "promotion_edit"
106 => "wifi_guest_bar"
107 => "promotion_max_count"
108 => "private_h"
109 => "promotion_activate"
110 => "promotion_heading_text"
111 => "promotion_media_type"
112 => "promotion_no_media"
113 => "promotion_choose_file"
114 => "promotion_image_upload"
115 => "promotion_image_file"
116 => "promotion_image_link"
117 => "promotion_video_link"
118 => "promotion_video_upload"
119 => "promotion_choose_mp4"
120 => "promotion_video_file"
121 => "promotion_body_text"
122 => "promotion_footer_text"
123 => "promotion_save"
124 => "bandwidth_bar"
125 => "bandwidth_4"
126 => "lan_bar"
127 => "lan_1"
128 => "lan_2"
129 => "lan_3"
130 => "lan_4"
131 => "lan_5"
132 => "lan_6"
133 => "lan_7"
134 => "lan_8"
135 => "lan_9"
136 => "lan_10"
137 => "firewall_bar"
138 => "firewall_1"
139 => "firewall_2"
140 => "firewall_3"
141 => "firewall_4"
142 => "firewall_5"
143 => "firewall_6"
144 => "firewall_7"
145 => "firewall_8"
146 => "firewall_9a"
147 => "firewall_9b"
148 => "firewall_10a"
149 => "firewall_10b"
150 => "login_1_5"
151 => "bandwidth_2"
152 => "bandwidth_3"
153 => "firewall_14"
154 => "login_2_1"
155 => "firewall_15"
156 => "login_2_3"
157 => "firewall_16"
158 => "cloud_security_bar"
159 => "login_3"
160 => "cloud_security_1"
161 => "cloud_security_2"
162 => "cloud_security_3"
163 => "cloud_security_4"
164 => "cloud_security_5"
165 => "device_bar"
166 => "device_uplink"
167 => "note"
168 => "device_downlink"
169 => "device_action"
170 => "device_block"
171 => "stats_title"
172 => "stats_device_name"
173 => "stats_private_label"
174 => "homegateway"
175 => "stats_guest_label"
176 => "stats_no_private"
177 => "stats_no_guest"
178 => "stats_visitor_1"
179 => "stats_visitor_2"
180 => "stats_visitor_3"
181 => "stats_visitor_4"
182 => "stats_visitor_5"
183 => "stats_visitor_6"
184 => "stats_visitor_7"
185 => "stats_visitor_8"
186 => "stats_visitor_9"
187 => "stats_visitor_10"
188 => "nav_dashboard"
189 => "nav_private_settings"
190 => "nav_guest_settings"
191 => "nav_stats"
192 => "private_5"
193 => "wifi_private_bar"
194 => "wifi_settings_p"
195 => "cp_male"
196 => "bandwidth_1"
197 => "cp_err_1"
198 => "login_1_desc"
199 => "private_2_tip"
200 => "stats_desc"
201 => "stats_devices_title"
202 => "stats_ip_address"
203 => "login_4_desc"
204 => "stats_network_title"
205 => "stats_visitor_title"
206 => "email"
207 => "password"
208 => "disclaimer"
209 => "add_entry"
210 => "logout"
211 => "go"
212 => "please_wait"
213 => "uplink"
214 => "downlink"
215 => "help"
216 => "both"
217 => "and"
218 => "auto"
219 => "manage"
220 => "private"
221 => "guest"
222 => "browser_analytics"
223 => "passerby"
224 => "visitor"
225 => "visitor_chart_xaxisname"
226 => "visitor_chart_yaxisname"
227 => "visitor_chart_title"
228 => "save"
229 => "nav_1"
230 => "select_ap"
231 => "select_language"
232 => "wifi_private_bar"
233 => "wifi_private_8"
234 => "ap"
235 => "unmanaged_ap"
236 => "lan_9"
237 => "managed_ap"
238 => "limit"
239 => "c_managed_ap"
240 => "login_4_h"
241 => "login_1_5"
242 => "login_1_6"
243 => "cp_option_1"
244 => "cp_option_2"
245 => "cp_option_3"
246 => "firewall_bar"
247 => "cp_option_4"
248 => "cp_logo"
249 => "cp_main_logo"
250 => "cp_upload_logo"
251 => "cp_choose_a_file"
252 => "cp_file"
253 => "cp_color"
254 => "cp_background"
255 => "cp_subtitle_text"
256 => "cp_text_content"
257 => "cp_title"
258 => "cp_firstname"
259 => "cp_lastname"
260 => "cp_email_addess"
261 => "cp_gender"
262 => "cp_male"
263 => "cp_female"
264 => "cp_err_1"
265 => "cloud_security_bar"
266 => "cp_err_2"
267 => "promotion_saving_promotion"
268 => "promotion_continue_browsing"
269 => "lan_11"
270 => "lan_12"
271 => "lan_error"
272 => "lan_error2"
273 => "lan_error3"
274 => "lan_error4"
275 => "lan_error5"
276 => "device_bandwidth"
277 => "device_access"
278 => "device_none"
279 => "device_allow"
280 => "device_scheldule"
281 => "device_last_active"
282 => "device_url"
283 => "device_header"
284 => "stats_title"
285 => "stats_visitor_11"
286 => "stats_visitor_12"
287 => "stats_devices_title"
288 => "stats_device_name"
289 => "stats_ip_address"
290 => "stats_private_label"
291 => "stats_visitor_13"
292 => "inactive"
293 => "stats_no_guest"
294 => "active"
295 => "offline"
296 => "stats_visitor_2"
297 => "all_address"
298 => "stats_visitor_4"
299 => "stats_visitor_5"
300 => "stats_visitor_6"
301 => "wifi_h"
302 => "stats_visitor_8"
303 => "stats_visitor_9"
304 => "stats_visitor_10"
305 => "stats_visitor_11"
306 => "stats_visitor_12"
307 => "stats_visitor_13"
308 => "nav_dashboard"
309 => "nav_private_settings"
310 => "nav_guest_settings"
311 => "wifi_p1"
]
array2
array:313 [▼
0 => "h"
1 => "p1"
2 => "p2"
3 => "modify"
4 => "more_settings"
5 => "on"
6 => "off"
7 => "email"
8 => "password"
9 => "disclaimer"
10 => "add_entry"
11 => "logout"
12 => "go"
13 => "please_wait"
14 => "uplink"
15 => "downlink"
16 => "help"
17 => "both"
18 => "and"
19 => "auto"
20 => "manage"
21 => "private"
22 => "guest"
23 => "browser_analytics"
24 => "passerby"
25 => "visitor"
26 => "visitor_chart_xaxisname"
27 => "visitor_chart_yaxisname"
28 => "visitor_chart_title"
29 => "save"
30 => "inactive"
31 => "active"
32 => "offline"
33 => "search"
34 => "copy"
35 => "print"
36 => "nav_1"
37 => "select_ap"
38 => "select_language"
39 => "day_0"
40 => "day_1"
41 => "day_2"
42 => "day_3"
43 => "day_4"
44 => "day_5"
45 => "day_6"
46 => "second"
47 => "minute"
48 => "hour"
49 => "day"
50 => "week"
51 => "month"
52 => "year"
53 => "seconds"
54 => "minutes"
55 => "hours"
56 => "days"
57 => "weeks"
58 => "months"
59 => "years"
60 => "second_ago"
61 => "minute_ago"
62 => "hour_ago"
63 => "day_ago"
64 => "week_ago"
65 => "month_ago"
66 => "year_ago"
67 => "seconds_ago"
68 => "minutes_ago"
69 => "hours_ago"
70 => "days_ago"
71 => "weeks_ago"
72 => "months_ago"
73 => "years_ago"
74 => "wifi_h"
75 => "wifi_p1"
76 => "wifi_err"
77 => "wifi_private_bar"
78 => "wifi_private_1"
79 => "wifi_private_2"
80 => "wifi_private_3"
81 => "wifi_private_4"
82 => "wifi_private_5"
83 => "wifi_private_6"
84 => "wifi_private_7"
85 => "wifi_private_8"
86 => "wifi_guest_bar"
87 => "wifi_guest_1"
88 => "wifi_guest_2"
89 => "wifi_guest_3"
90 => "wifi_guest_4"
91 => "wifi_guest_5"
92 => "wifi_guest_6"
93 => "wifi_guest_7"
94 => "wifi_guest_8"
95 => "wifi_guest_9"
96 => "wifi_info_bar"
97 => "wifi_info_1"
98 => "wifi_info_2"
99 => "wifi_info_3"
100 => "wifi_info_6"
101 => "wifi_status"
102 => "bandwidth_bar"
103 => "bandwidth_1"
104 => "bandwidth_2"
105 => "bandwidth_3"
106 => "bandwidth_4"
107 => "wifi_settings_h"
108 => "wifi_settings_p"
109 => "private_h"
110 => "private_p"
111 => "private_bar"
112 => "private_1"
113 => "private_2"
114 => "private_2_tip"
115 => "private_3"
116 => "private_3_tip"
117 => "private_4"
118 => "private_4_tip"
119 => "private_5"
120 => "private_5_tip"
121 => "private_6"
122 => "private_7"
123 => "homegateway"
124 => "ap"
125 => "unmanaged_ap"
126 => "managed_ap"
127 => "limit"
128 => "c_managed_ap"
129 => "guest_bar"
130 => "guest_1"
131 => "guest_2"
132 => "guest_3"
133 => "guest_4"
134 => "guest_5"
135 => "guest_6"
136 => "guest_7"
137 => "guest_8"
138 => "guest_9"
139 => "guest_10"
140 => "guest_11"
141 => "guest_12"
142 => "guest_13"
143 => "guest_14"
144 => "login_bar"
145 => "login_1"
146 => "login_1_desc"
147 => "login_1_1"
148 => "login_1_2"
149 => "login_1_3"
150 => "login_1_4"
151 => "login_1_5"
152 => "login_1_6"
153 => "login_2"
154 => "login_2_desc"
155 => "login_2_1"
156 => "login_2_2"
157 => "login_2_3"
158 => "login_2_4"
159 => "login_2_5"
160 => "login_3"
161 => "login_3_desc"
162 => "activate_fb"
163 => "config_status"
164 => "facebook_pg"
165 => "configure"
166 => "refresh_status"
167 => "deactivate"
168 => "note"
169 => "redirect_fb_pg"
170 => "save_set"
171 => "hit"
172 => "update_status"
173 => "close"
174 => "got_it"
175 => "login_4"
176 => "login_4_desc"
177 => "login_4_h"
178 => "cp_option_1"
179 => "cp_option_2"
180 => "cp_option_3"
181 => "cp_option_4"
182 => "cp_logo"
183 => "cp_main_logo"
184 => "cp_upload_logo"
185 => "cp_choose_a_file"
186 => "cp_file"
187 => "cp_color"
188 => "cp_background"
189 => "cp_subtitle_text"
190 => "cp_text_content"
191 => "cp_title"
192 => "cp_firstname"
193 => "cp_lastname"
194 => "cp_email_addess"
195 => "cp_gender"
196 => "cp_male"
197 => "cp_female"
198 => "cp_err_1"
199 => "cp_err_2"
200 => "promotion_manager_bar"
201 => "promotion_heading"
202 => "promotion"
203 => "current_promotions"
204 => "promotion_name"
205 => "promotion_status"
206 => "promotion_actions"
207 => "promotion_preview"
208 => "promotion_add"
209 => "promotion_edit"
210 => "promotion_max_count"
211 => "promotion_activate"
212 => "promotion_heading_text"
213 => "promotion_media_type"
214 => "promotion_no_media"
215 => "promotion_choose_file"
216 => "promotion_image_upload"
217 => "promotion_image_file"
218 => "promotion_image_link"
219 => "promotion_video_link"
220 => "promotion_video_upload"
221 => "promotion_choose_mp4"
222 => "promotion_video_file"
223 => "promotion_body_text"
224 => "promotion_footer_text"
225 => "promotion_save"
226 => "promotion_saving_promotion"
227 => "promotion_continue_browsing"
228 => "lan_bar"
229 => "lan_1"
230 => "lan_2"
231 => "lan_3"
232 => "lan_4"
233 => "lan_5"
234 => "lan_6"
235 => "lan_7"
236 => "lan_8"
237 => "lan_9"
238 => "lan_10"
239 => "lan_11"
240 => "lan_12"
241 => "lan_error"
242 => "lan_error2"
243 => "lan_error3"
244 => "lan_error4"
245 => "lan_error5"
246 => "all_address"
247 => "firewall_bar"
248 => "firewall_1"
249 => "firewall_2"
250 => "firewall_3"
251 => "firewall_4"
252 => "firewall_5"
253 => "firewall_6"
254 => "firewall_7"
255 => "firewall_8"
256 => "firewall_9a"
257 => "firewall_9b"
258 => "firewall_10a"
259 => "firewall_10b"
260 => "firewall_11"
261 => "firewall_12"
262 => "firewall_13"
263 => "firewall_14"
264 => "firewall_15"
265 => "firewall_16"
266 => "cloud_security_bar"
267 => "cloud_security_header"
268 => "cloud_security_none"
269 => "cloud_security_restricted"
270 => "cloud_security_medium"
271 => "cloud_security_low"
272 => "device_bar"
273 => "device_uplink"
274 => "device_downlink"
275 => "device_action"
276 => "device_block"
277 => "device_bandwidth"
278 => "device_access"
279 => "device_none"
280 => "device_allow"
281 => "device_scheldule"
282 => "device_last_active"
283 => "device_url"
284 => "device_header"
285 => "stats_title"
286 => "stats_desc"
287 => "stats_network_title"
288 => "stats_devices_title"
289 => "stats_device_name"
290 => "stats_ip_address"
291 => "stats_private_label"
292 => "stats_guest_label"
293 => "stats_no_private"
294 => "stats_no_guest"
295 => "stats_visitor_title"
296 => "stats_visitor_1"
297 => "stats_visitor_2"
298 => "stats_visitor_3"
299 => "stats_visitor_4"
300 => "stats_visitor_5"
301 => "stats_visitor_6"
302 => "stats_visitor_7"
303 => "stats_visitor_8"
304 => "stats_visitor_9"
305 => "stats_visitor_10"
306 => "stats_visitor_11"
307 => "stats_visitor_12"
308 => "stats_visitor_13"
309 => "nav_dashboard"
310 => "nav_private_settings"
311 => "nav_guest_settings"
312 => "nav_stats"
]
Result
"array_intersect : --------- "
“array_intersect:---------”
array:307 [▼
0 => "h"
1 => "p1"
2 => "p2"
3 => "modify"
4 => "more_settings"
5 => "on"
6 => "off"
7 => "day_0"
8 => "day_1"
9 => "day_2"
10 => "day_3"
11 => "day_4"
12 => "day_5"
13 => "day_6"
14 => "minutes"
15 => "hours"
16 => "day"
17 => "days"
18 => "wifi_err"
19 => "wifi_private_1"
20 => "wifi_private_2"
21 => "wifi_private_3"
22 => "wifi_private_4"
23 => "wifi_private_5"
24 => "wifi_private_6"
25 => "wifi_private_7"
26 => "wifi_guest_1"
27 => "wifi_guest_2"
28 => "wifi_guest_3"
29 => "wifi_guest_4"
30 => "wifi_guest_5"
31 => "wifi_guest_6"
32 => "wifi_guest_7"
33 => "wifi_guest_8"
34 => "wifi_guest_9"
35 => "wifi_info_bar"
36 => "wifi_info_1"
37 => "wifi_info_2"
38 => "wifi_info_3"
39 => "wifi_info_6"
40 => "wifi_status"
41 => "firewall_11"
42 => "wifi_settings_h"
43 => "wifi_guest_bar"
44 => "private_h"
45 => "private_p"
46 => "private_bar"
47 => "private_3_tip"
48 => "private_4"
49 => "private_4_tip"
50 => "private_6"
51 => "private_7"
52 => "guest_bar"
53 => "guest_2"
54 => "guest_3"
55 => "guest_4"
56 => "guest_5"
57 => "guest_6"
58 => "guest_12"
59 => "guest_13"
60 => "guest_14"
61 => "login_1_1"
62 => "login_1_2"
63 => "login_1_3"
64 => "login_1_4"
65 => "login_2"
66 => "login_2_1"
67 => "login_2_2"
68 => "login_2_3"
69 => "login_2_4"
70 => "login_2_5"
71 => "login_4"
72 => "firewall_12"
73 => "firewall_13"
74 => "private_1"
75 => "guest_1"
76 => "private_3"
77 => "guest_7"
78 => "wifi_private_2"
79 => "guest_9"
80 => "guest_10"
81 => "guest_11"
82 => "login_1"
83 => "guest_8"
84 => "private_5_tip"
85 => "private_2"
86 => "login_bar"
87 => "login_2_desc"
88 => "wifi_guest_3"
89 => "login_3"
90 => "wifi_guest_5"
91 => "wifi_guest_6"
92 => "wifi_guest_7"
93 => "wifi_guest_8"
94 => "login_3_desc"
95 => "promotion_manager_bar"
96 => "promotion_heading"
97 => "promotion"
98 => "current_promotions"
99 => "promotion_name"
100 => "promotion_status"
101 => "promotion_actions"
102 => "promotion_preview"
103 => "promotion_add"
104 => "bandwidth_3"
105 => "promotion_edit"
106 => "wifi_guest_bar"
107 => "promotion_max_count"
108 => "private_h"
109 => "promotion_activate"
110 => "promotion_heading_text"
111 => "promotion_media_type"
112 => "promotion_no_media"
113 => "promotion_choose_file"
114 => "promotion_image_upload"
115 => "promotion_image_file"
116 => "promotion_image_link"
117 => "promotion_video_link"
118 => "promotion_video_upload"
119 => "promotion_choose_mp4"
120 => "promotion_video_file"
121 => "promotion_body_text"
122 => "promotion_footer_text"
123 => "promotion_save"
124 => "bandwidth_bar"
125 => "bandwidth_4"
126 => "lan_bar"
127 => "lan_1"
128 => "lan_2"
129 => "lan_3"
130 => "lan_4"
131 => "lan_5"
132 => "lan_6"
133 => "lan_7"
134 => "lan_8"
135 => "lan_9"
136 => "lan_10"
137 => "firewall_bar"
138 => "firewall_1"
139 => "firewall_2"
140 => "firewall_3"
141 => "firewall_4"
142 => "firewall_5"
143 => "firewall_6"
144 => "firewall_7"
145 => "firewall_8"
146 => "firewall_9a"
147 => "firewall_9b"
148 => "firewall_10a"
149 => "firewall_10b"
150 => "login_1_5"
151 => "bandwidth_2"
152 => "bandwidth_3"
153 => "firewall_14"
154 => "login_2_1"
155 => "firewall_15"
156 => "login_2_3"
157 => "firewall_16"
158 => "cloud_security_bar"
159 => "login_3"
165 => "device_bar"
166 => "device_uplink"
167 => "note"
168 => "device_downlink"
169 => "device_action"
170 => "device_block"
171 => "stats_title"
172 => "stats_device_name"
173 => "stats_private_label"
174 => "homegateway"
175 => "stats_guest_label"
176 => "stats_no_private"
177 => "stats_no_guest"
178 => "stats_visitor_1"
179 => "stats_visitor_2"
180 => "stats_visitor_3"
181 => "stats_visitor_4"
182 => "stats_visitor_5"
183 => "stats_visitor_6"
184 => "stats_visitor_7"
185 => "stats_visitor_8"
186 => "stats_visitor_9"
187 => "stats_visitor_10"
188 => "nav_dashboard"
189 => "nav_private_settings"
190 => "nav_guest_settings"
191 => "nav_stats"
192 => "private_5"
193 => "wifi_private_bar"
194 => "wifi_settings_p"
195 => "cp_male"
196 => "bandwidth_1"
197 => "cp_err_1"
198 => "login_1_desc"
199 => "private_2_tip"
200 => "stats_desc"
201 => "stats_devices_title"
202 => "stats_ip_address"
203 => "login_4_desc"
204 => "stats_network_title"
205 => "stats_visitor_title"
206 => "email"
207 => "password"
208 => "disclaimer"
209 => "add_entry"
210 => "logout"
211 => "go"
212 => "please_wait"
213 => "uplink"
214 => "downlink"
215 => "help"
216 => "both"
217 => "and"
218 => "auto"
219 => "manage"
220 => "private"
221 => "guest"
222 => "browser_analytics"
223 => "passerby"
224 => "visitor"
225 => "visitor_chart_xaxisname"
226 => "visitor_chart_yaxisname"
227 => "visitor_chart_title"
228 => "save"
229 => "nav_1"
230 => "select_ap"
231 => "select_language"
232 => "wifi_private_bar"
233 => "wifi_private_8"
234 => "ap"
235 => "unmanaged_ap"
236 => "lan_9"
237 => "managed_ap"
238 => "limit"
239 => "c_managed_ap"
240 => "login_4_h"
241 => "login_1_5"
242 => "login_1_6"
243 => "cp_option_1"
244 => "cp_option_2"
245 => "cp_option_3"
246 => "firewall_bar"
247 => "cp_option_4"
248 => "cp_logo"
249 => "cp_main_logo"
250 => "cp_upload_logo"
251 => "cp_choose_a_file"
252 => "cp_file"
253 => "cp_color"
254 => "cp_background"
255 => "cp_subtitle_text"
256 => "cp_text_content"
257 => "cp_title"
258 => "cp_firstname"
259 => "cp_lastname"
260 => "cp_email_addess"
261 => "cp_gender"
262 => "cp_male"
263 => "cp_female"
264 => "cp_err_1"
265 => "cloud_security_bar"
266 => "cp_err_2"
267 => "promotion_saving_promotion"
268 => "promotion_continue_browsing"
269 => "lan_11"
270 => "lan_12"
271 => "lan_error"
272 => "lan_error2"
273 => "lan_error3"
274 => "lan_error4"
275 => "lan_error5"
276 => "device_bandwidth"
277 => "device_access"
278 => "device_none"
279 => "device_allow"
280 => "device_scheldule"
281 => "device_last_active"
282 => "device_url"
283 => "device_header"
284 => "stats_title"
285 => "stats_visitor_11"
286 => "stats_visitor_12"
287 => "stats_devices_title"
288 => "stats_device_name"
289 => "stats_ip_address"
290 => "stats_private_label"
291 => "stats_visitor_13"
292 => "inactive"
293 => "stats_no_guest"
294 => "active"
295 => "offline"
296 => "stats_visitor_2"
297 => "all_address"
298 => "stats_visitor_4"
299 => "stats_visitor_5"
300 => "stats_visitor_6"
301 => "wifi_h"
302 => "stats_visitor_8"
303 => "stats_visitor_9"
304 => "stats_visitor_10"
305 => "stats_visitor_11"
306 => "stats_visitor_12"
307 => "stats_visitor_13"
308 => "nav_dashboard"
309 => "nav_private_settings"
310 => "nav_guest_settings"
311 => "wifi_p1"
]
"array_diff : --------- "
“array_diff:---------”
array:5 [▼
160 => "cloud_security_1"
161 => "cloud_security_2"
162 => "cloud_security_3"
163 => "cloud_security_4"
164 => "cloud_security_5"
]
Questions
How would one go about and debug this further ?
如何进行并进一步调试?
I'm open to any suggestions at this moment.
我现在对任何建议持开放态度。
Any hints/suggestions / helps on this be will be much appreciated!
任何提示/建议/帮助都将非常感谢!
2 个解决方案
#1
2
You can make use of Collections to do this, specifically the diff
method:
您可以使用Collections来执行此操作,特别是diff方法:
This method will return the values in the original collection that are not present in the given collection:
此方法将返回原始集合中不存在于给定集合中的值:
You can find items that exist in the first array that do not exist in the second like this:
您可以在第二个数组中找到第二个中不存在的项目,如下所示:
$diff = collect($array1)->diff($array2);
That will return an array of 44 missing items — based on the values you provided in your question.
这将返回44个缺失项目的数组 - 基于您在问题中提供的值。
#2
1
This should work:
这应该工作:
$result = array_merge(array_diff(array_values($collections_code),array_values($languages_code)),array_diff(array_values($languages_code),array_values($collections_code)));
print_r($result);
#1
2
You can make use of Collections to do this, specifically the diff
method:
您可以使用Collections来执行此操作,特别是diff方法:
This method will return the values in the original collection that are not present in the given collection:
此方法将返回原始集合中不存在于给定集合中的值:
You can find items that exist in the first array that do not exist in the second like this:
您可以在第二个数组中找到第二个中不存在的项目,如下所示:
$diff = collect($array1)->diff($array2);
That will return an array of 44 missing items — based on the values you provided in your question.
这将返回44个缺失项目的数组 - 基于您在问题中提供的值。
#2
1
This should work:
这应该工作:
$result = array_merge(array_diff(array_values($collections_code),array_values($languages_code)),array_diff(array_values($languages_code),array_values($collections_code)));
print_r($result);