PHP - Recorrer super arreglo

 
Vista:

Recorrer super arreglo

Publicado por Diego Forero (27 intervenciones) el 05/12/2019 22:35:45
Hola amigos de php, tengo una consulta para ustedes las mentes maestras..
Tengo el siguiente arreglo

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
array (size=10)
  0 =>
    array (size=9)
      'id' => int 60874
      'action' =>
        array (size=6)
          'id' => int 11
          'data_master_id' => int 10
          'name' => string 'Entrada' (length=7)
          'description' => string 'Inicio Jornada laboral' (length=22)
          'resource' => string 'main_entry' (length=10)
          'enabled' => boolean true
      'warehouse_id' => int 4
      'created_at' => string '2019-12-02 08:01:08' (length=19)
      'updated_at' => string '2019-12-02 08:01:08' (length=19)
      'people' =>
        array (size=11)
          'names' => string 'Diego Alejandro' (length=15)
          'last_names' => string 'Forero Pinzon' (length=13)
          'document_id' => string 'xxxxxxxxxxxxxx' (length=10)
      'warehouse' =>
        array (size=7)
          'warehouse' => string '02' (length=2)
          'name' => string 'S S C' (length=5)
 
  1 =>
    array (size=9)
      'id' => int 61078
      'action' =>
        array (size=6)
          'id' => int 14
          'data_master_id' => int 10
          'name' => string 'Salida Almuerzo' (length=15)
          'description' => string 'Hora de salida almuerzo' (length=23)
          'resource' => string 'lunch_off' (length=9)
          'enabled' => boolean true
      'warehouse_id' => int 4
      'created_at' => string '2019-12-02 14:07:40' (length=19)
      'updated_at' => string '2019-12-02 14:07:40' (length=19)
      'enabled' => boolean true
      'people' =>
        array (size=11)
          'names' => string 'Diego Alejandro' (length=15)
          'last_names' => string 'Forero Pinzon' (length=13)
          'document_id' => string 'xxxxxxxxxx' (length=10)
      'warehouse' =>
        array (size=7)
          'warehouse' => string '02' (length=2)
          'name' => string 'S S C' (length=5)
 
  2 =>
    array (size=9)
      'id' => int 61112
      'action' =>
        array (size=6)
          'id' => int 15
          'data_master_id' => int 10
          'name' => string 'Entrada Almuerzo' (length=16)
          'description' => string 'Hora de entrada almuerzo' (length=24)
          'resource' => string 'lunch_entry' (length=11)
          'enabled' => boolean true
      'warehouse_id' => int 4
      'created_at' => string '2019-12-02 14:48:11' (length=19)
      'updated_at' => string '2019-12-02 14:48:11' (length=19)
      'enabled' => boolean true
      'people' =>
        array (size=11)
          'names' => string 'Diego Alejandro' (length=15)
          'last_names' => string 'Forero Pinzon' (length=13)
          'address' => string 'Diag 49 a bis a  # 17 - 30 sur' (length=30)
          'document_id' => string 'xxxxxxxxxxx' (length=10)
 
      'warehouse' =>
        array (size=7)
          'warehouse' => string '02' (length=2)
          'name' => string 'S S C' (length=5)
 
  3 =>
    array (size=9)
      'id' => int 61181
      'action' =>
        array (size=6)
          'id' => int 16
          'data_master_id' => int 10
          'name' => string 'Salida' (length=6)
          'description' => string 'Fin jornada laboral' (length=19)
          'resource' => string 'main_off' (length=8)
          'enabled' => boolean true
      'warehouse_id' => int 4
      'created_at' => string '2019-12-02 18:06:48' (length=19)
      'updated_at' => string '2019-12-02 18:06:48' (length=19)
      'enabled' => boolean true
      'people' =>
        array (size=11)
          'names' => string 'Diego Alejandro' (length=15)
          'last_names' => string 'Forero Pinzon' (length=13)
          'document_id' => string 'xxxxxxxxxxxx' (length=10)
 
      'warehouse' =>
        array (size=7)
          'warehouse' => string '02' (length=2)
          'name' => string 'S S C' (length=5)
 
  4 =>
    array (size=9)
      'id' => int 61375
      'action' =>
        array (size=6)
          'id' => int 11
          'data_master_id' => int 10
          'name' => string 'Entrada' (length=7)
          'description' => string 'Inicio Jornada laboral' (length=22)
          'resource' => string 'main_entry' (length=10)
          'enabled' => boolean true
      'warehouse_id' => int 4
      'created_at' => string '2019-12-03 08:14:06' (length=19)
      'updated_at' => string '2019-12-03 08:14:06' (length=19)
      'enabled' => boolean true
      'people' =>
        array (size=11)
          'names' => string 'Diego Alejandro' (length=15)
          'last_names' => string 'Forero Pinzon' (length=13)
          'document_id' => string 'xxxxxxxxxxx' (length=10)
 
      'warehouse' =>
        array (size=7)
          'warehouse' => string '02' (length=2)
          'name' => string 'S S C' (length=5)
 
  5 =>
    array (size=9)
      'id' => int 61638
      'action' =>
        array (size=6)
          'id' => int 16
          'data_master_id' => int 10
          'name' => string 'Salida' (length=6)
          'description' => string 'Fin jornada laboral' (length=19)
          'resource' => string 'main_off' (length=8)
          'enabled' => boolean true
      'warehouse_id' => int 4
      'created_at' => string '2019-12-03 18:14:42' (length=19)
      'updated_at' => string '2019-12-03 18:14:42' (length=19)
      'enabled' => boolean true
      'people' =>
        array (size=11)
          'names' => string 'Diego Alejandro' (length=15)
          'last_names' => string 'Forero Pinzon' (length=13)
          'document_id' => string 'xxxxxxxxxxx' (length=10)
 
      'warehouse' =>
        array (size=7)
          'warehouse' => string '02' (length=2)
          'name' => string 'S S C' (length=5)
 
  6 =>
    array (size=9)
      'id' => int 61816
      'action' =>
        array (size=6)
          'id' => int 11
          'data_master_id' => int 10
          'name' => string 'Entrada' (length=7)
          'description' => string 'Inicio Jornada laboral' (length=22)
          'resource' => string 'main_entry' (length=10)
          'enabled' => boolean true
      'warehouse_id' => int 4
      'created_at' => string '2019-12-04 07:49:45' (length=19)
      'updated_at' => string '2019-12-04 07:49:45' (length=19)
      'people' =>
        array (size=11)
          'names' => string 'Diego Alejandro' (length=15)
          'last_names' => string 'Forero Pinzon' (length=13)
          'document_id' => string 'xxxxxxx' (length=10)
      'warehouse' =>
        array (size=7)
          'warehouse' => string '02' (length=2)
          'name' => string 'S S C' (length=5)
 
  7 =>
    array (size=9)
      'id' => int 62367
      'action' =>
        array (size=6)
          'id' => int 11
          'data_master_id' => int 10
          'name' => string 'Entrada' (length=7)
          'description' => string 'Inicio Jornada laboral' (length=22)
          'resource' => string 'main_entry' (length=10)
          'enabled' => boolean true
      'warehouse_id' => int 4
      'created_at' => string '2019-12-05 12:38:33' (length=19)
      'updated_at' => string '2019-12-05 12:38:33' (length=19)
      'enabled' => boolean true
      'people' =>
        array (size=11)
          'names' => string 'Diego Alejandro' (length=15)
          'last_names' => string 'Forero Pinzon' (length=13)
          'document_id' => string 'xxxxxxxxxxx' (length=10)
 
      'warehouse' =>
        array (size=7)
          'warehouse' => string '02' (length=2)
          'name' => string 'S S C' (length=5)
 
  8 =>
    array (size=9)
      'id' => int 62465
      'action' =>
        array (size=6)
          'id' => int 14
          'data_master_id' => int 10
          'name' => string 'Salida Almuerzo' (length=15)
          'description' => string 'Hora de salida almuerzo' (length=23)
          'resource' => string 'lunch_off' (length=9)
          'enabled' => boolean true
      'warehouse_id' => int 4
      'created_at' => string '2019-12-05 14:18:52' (length=19)
      'updated_at' => string '2019-12-05 14:18:52' (length=19)
      'enabled' => boolean true
      'people' =>
        array (size=11)
          'names' => string 'Diego Alejandro' (length=15)
          'last_names' => string 'Forero Pinzon' (length=13)
          'document_id' => string 'xxxxxxxxxxxxxxxxx' (length=10)
 
      'warehouse' =>
        array (size=7)
          'warehouse' => string '02' (length=2)
          'name' => string 'S S C' (length=5)
 
  9 =>
    array (size=9)
      'id' => int 62488
      'action' =>
        array (size=6)
          'id' => int 15
          'data_master_id' => int 10
          'name' => string 'Entrada Almuerzo' (length=16)
          'description' => string 'Hora de entrada almuerzo' (length=24)
          'resource' => string 'lunch_entry' (length=11)
          'enabled' => boolean true
      'warehouse_id' => int 4
      'created_at' => string '2019-12-05 14:52:23' (length=19)
      'updated_at' => string '2019-12-05 14:52:23' (length=19)
      'enabled' => boolean true
      'people' =>
        array (size=11)
          'names' => string 'Diego Alejandro' (length=15)
          'last_names' => string 'Forero Pinzon' (length=13)
          'document_id' => string 'xxxxxxxxxxxxx' (length=10)
      'warehouse' =>
        array (size=7)
          'warehouse' => string '02' (length=2)
          'name' => string 'S S C' (length=5)

corresponde a unas marcaciones que hacen las personas para controlar los horarios laborales, lo que necesito, es sacar en una sola linea hora de entrada, salida almuerzo, entrada almuerzo, salida cada uno con su correspondiente nombre, tienda, cedula..

No sé como recorrer ese arreglo para obtener esa informacion.. la idea obtener cada valor en una variable para poder tratar esos datos, los id que correponde a cada marcacion son los sigueintes 11: Entrada, 14:salida almuerzo, 15:entrada almuerzo, 16: salida.... la idea es que si no tiene alguno de estos registros me muestre el registro que sea que tenga ese dia y los demás como no registra...

ejemplo de lo esperado

Diego Alejandro Forero | 10311156 | 02-S S C | 02-11-2019 | 08:00:00 | 01:00:00 | 02:00:00 | 18:00:00
Diego Alejandro Forero | 10311156 | 02-S S C | 03-11-2019 | 08:00:00 | No registra | No registra | 18:00:00
Diego Alejandro Forero | 10311156 | 02-S S C | 04-11-2019 | 08:00:00 | No registra | No registra | No registra

Agradezco mucho su ayuda la verdad estoy muy perdido...

Gracias!
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder