php数组6 x 6爆炸

时间:2019-03-15 11:56:29

标签: php

array:546 [   0 => "554"   1 => "15.03 05:00"   2 => "LKU"   3 => "Emelec"   4 => "0 - 0 0-0"   5 => "Huracan"   6 => "0-0"   7 => "553" 8 => "15.03 03:30"   9 => "BOL"   10 => "Guabira"   11 => "3 - 1 1-1"  12 => "Royal Pari Sion"   13 => "1-1"   14 => "552"   15 => "15.03 03:30"   16 => "BRK"   17 => "Vasco Da Gama"   18 => "3 - 2 1-1"   19
=> "Avai"   20 => "1-1"   21 => "551"   22 => "15.03 03:30"   23 => "COLC "   24 => "Depor Cucuta"   25 => "2 - 1 0-0"   26 => "Alianza Petrolera"   27 => "0-0"   28 => "550"   29 => "15.03 03:00"   30 => "LKU"   31 => "Atletico Pr"   32 => "4 - 0 2-0"   33 => "Jorge Wilstermann"   34 => "2-0"   35 => "549"   36 => "15.03 03:00"   37 => "CCC"   38 => "Kansas"   39 => "3 - 0 0-0"   40 => "Independiente Chorrera"   41 => "0-0"   42 => "548"   43 => "15.03 01:15"   44 => "BOL"   45 => "Sport Boys Warnes"   46 => "1 - 5 0-2"   47 => "Blooming"   48 => "0-2"   49 => "547"   50 => "15.03 01:00"   51 => "LKU"   52 => "Penarol"   53 => "4 - 0 3-0"   54 => "San Jose Oruro"   55 => "3-0"   56 => "544"   57 => "14.03 23:00"   58 => "AVL"   59 => "Villarreal"   60 => "2 - 1 1-0"   61 => "Zenit"   62 => "1-0"   63 => "543"   64 => "14.03 23:00"   65 => "AVL"   66 => "Slavia Prag"   67
=> "2 - 2 1-1"   68 => "Sevilla"   69 => "1-1"   70 => "542"   71 => "14.03 23:00"   72 => "AVL"   73 => "Inter"   74 => "0 - 1 0-1"   75
=> "E.Frankfurt"   76 => "0-1"   77 => "541"   78 => "14.03 23:00"   79 => "AVL"   80 => "Benfica"   81 => "1 - 0 0-0"   82 => "Dinamo Zagreb"   83 => "0-0"   84 => "540"   85 => "14.03 23:00"   86 => "AVL"   87 => "Arsenal"   88 => "3 - 0 2-0"   89 => "Rennes"   90 => "2-0"   91 => "539"   92 => "14.03 22:30"   93 => "FR3"   94 => "Chambly"   95 => "0 - 0 0-0"   96 => "Laval"   97 => "0-0"   98 => "536"   99 => "14.03 20:55"   100 => "AVL"   101 => "Salzburg"   102
=> "3 - 1 1-1"   103 => "Napoli"   104 => "1-1"   105 => "535"   106 => "14.03 20:55"   107 => "AVL"   108 => "Krasnodar"   109 => "1 - 1 0-0"   110 => "Valencia"   111 => "0-0"   112 => "534"   113 => "14.03 20:55"   114 => "AVL"   115 => "Dynamo Kiev"   116 => "0 - 5 0-3"   117 => "Chelsea"   118 => "0-3"   119 => "533"   120 => "14.03 20:00"  121 => "DAK"   122 => "Nastved"   123 => "1 - 3 1-2"   124 => "Aalborg"   125 => "1-2"   126 => "532"   127 => "14.03 16:30"   128
=> "BLRK "   129 => "Isloch"   130 => "1 - 0 1-0"   131 => "Bate Borisov"   132 => "1-0"   133 => "531"   134 => "14.03 18:15"   135 => "POLK "   136 => "Puszcza Niepolomice"   137 => "0 - 1 0-1"   138 => "Miedz Legnica"   139 => "0-1"   140 => "530"   141 => "14.03 05:55"   142 => "MXC"   143 => "Club America"   144 => "2 - 0 0-0"   145 => "Guadalajara"   146 => "0-0"   147 => "529"   148 => "15.03 04:00"   149 => "MXC"   150 => "Juarez"   151 => "2 - 2 2-1"   152 => "Veracruz"   153 => "2-1"   154 => "528"   155 => "14.03 03:30"   156
=> "LKU"   157 => "Univ. Catolica"   158 => "2 - 1 1-0"   159 => "Rosario Central"   160 => "1-0"   161 => "527"   162 => "14.03 03:30" 163 => "LKU"   164 => "River Plate"   165 => "0 - 0 0-0"   166 => "Palestino"   167 => "0-0"   168 => "526"   169 => "14.03 03:30"   170
=> "LKU"   171 => "Internacional"   172 => "2 - 0 2-0"   173 => "Alianza Lima"   174 => "2-0"   175 => "525"   176 => "14.03 03:30"   177 => "LKU"   178 => "Flamengo"   179 => "3 - 1 1-0"   180 => "Ldu Quito"   181 => "1-0"   182 => "524"   183 => "14.03 03:30"   184 => "BOL"   185 => "The Strongest"   186 => "1 - 1 0-1"   187 => "Bolivar" 188 => "0-1"   189 => "523"   190 => "14.03 03:30"   191 => "BOL"   192 => "Oriente Petrolero"   193 => "4 - 1 3-1"   194 => "Always Ready"   195 => "3-1"   196 => "522"   197 => "14.03 03:30"   198 => "BRK"   199 => "Ceara"   200 => "1 - 3 1-1"   201 => "Corinthians"   202 => "1-1"   203 => "521"   204 => "14.03 03:00"   205 => "CCC"   206 => "Atlanta Utd"   207 => "1 - 0 0-0"   208 => "Monterrey"   209
=> "0-0"   210 => "520"   211 => "14.03 01:15"   212 => "LKU"   213 => "San Lorenzo"   214 => "1 - 0 0-0"   215 => "Atletico Junior"   216 => "0-0"   217 => "519"   218 => "15.03 01:15"   219 => "LKU"   220 => "Cruzeiro"   221 => " -  0-0"   222 => "Depor Lara"   223 => "0-0"   224 => "518"   225 => "14.03 01:15"   226 => "LKU"   227 => "Cerro Porteno"   228 => "2 - 1 1-0"   229 => "Zamora"   230 => "1-0"   231
=> "517"   232 => "14.03 01:15"   233 => "BOL"   234 => "Real Potosi"   235 => "2 - 2 1-1"   236 => "Aurora"   237 => "1-1"   238 => "516"   239 => "14.03 01:15"   240 => "BRK"   241 => "Botafogo Pb"   242 => "0
- 2 0-0"   243 => "Londrina Pr"   244 => "0-0"   245 => "513"   246 => "13.03 23:00"   247 => "İNC"   248 => "West Bromwich"   249 => "3 - 0 1-0"   250 => "Swansea City"   251 => "1-0"   252 => "512"   253 => "13.03 23:00"   254 => "COLC "   255 => "Deportivo Pasto"   256 => "0
- 2 0-0"   257 => "America De Cali"   258 => "0-0"   259 => "511"   260 => "13.03 22:45"   261 => "İNC"   262 => "Qpr"   263 => "1 - 2 0-0"   264 => "Rotherham"   265 => "0-0"   266 => "510"   267 => "13.03 22:45"   268 => "İNC"   269 => "Nottingham F"   270 => "1 - 3 1-2"   271 => "Aston Villa"   272 => "1-2"   273 => "509"   274 => "13.03 22:45"   275 => "İNC"   276 => "Norwich"   277 => "3 - 2 2-1"   278 => "Hull"   279 => "2-1"   280 => "508"   281 => "13.03 22:45"   282 => "İNC"   283 => "Middlesbrough"   284 => "1 - 2 1-0"   285 => "Preston"   286 => "1-0"   287 => "507"   288 => "13.03 22:45"   289
=> "İNC"   290 => "Derby County"   291 => "0 - 0 0-0"   292 => "Stoke"   293 => "0-0"   294 => "506"   295 => "13.03 22:45"   296 => "İNC"   297 => "Birmingham"   298 => "0 - 2 0-2"   299 => "Millwall"   300 => "0-2"   301 => "505"   302 => "13.03 21:00"   303 => "AL3"   304 => "Sonnenhof Grossaspach"   305 => "2 - 3 0-0"   306 => "Wehen"   307 => "0-0"   308 => "504"   309 => "13.03 21:00"   310 => "AL3"   311 => "Karlsruher"   312 => "0 - 3 0-2"   313 => "Aalen"   314 => "0-2"   315 => "503"   316 => "13.03 21:00"   317 => "AL3"   318 => "Kaiserslautern"   319 => "0 - 0 0-0"   320 => "Braunschweig"   321 => "0-0"   322 => "502"   323 => "13.03 21:00"   324 => "AL3"   325 => "Jena"   326 => "1 - 1 0-0"   327 => "Sportfreunde Lotte"   328 => "0-0"   329 => "501"   330 => "13.03 21:00"   331 => "AL3"   332 => "Hallescher"   333 => "2 - 3 2-1"   334 => "E.Cottbus"   335 => "2-1"  336 => "500"   337 => "13.03 20:30"   338 => "HOL"   339 => "Ajax"   340 => "2 - 1 1-0"   341 => "Zwolle"   342 => "1-0"   343 => "499"   344 => "13.03 20:00"   345 => "POLK "   346 => "Rakow Czestochowa"   347 => "1 - 1 1-1"   348 => "Legia Warszawa"   349 => "1-1"   350 => "498"   351 => "13.03 20:00"   352 => "MACK "   353 => "Ferencvaros"   354 => "1 - 2 1-1"   355 => "Mol Vidi"   356 => "1-1"   357 => "497"   358 => "13.03 20:00"   359 => "DAK"   360 => "Kolding Kobenhavn"   361
=> "0 - 2 0-1"   362 => "Midtjylland"   363 => "0-1"   364 => "496"   365 => "13.03 17:00"   366 => "MACK "   367 => "Puskas Academy"   368
=> "1 - 1 1-0"   369 => "Soroksar"   370 => "1-0"   371 => "495"   372 => "13.03 16:30"   373 => "MACK "   374 => "Budaorsi"   375 => "1 - 2 1-0"   376 => "Budapest Honved"   377 => "1-0"   378 => "493"   379 => "13.03 15:00"   380 => "AŞMP "   381 => "Beijing Guoan"   382 => "0 - 0 0-0"   383 => "Urawa"   384 => "0-0"   385 => "492"   386 => "13.03 14:00"   387 => "AŞMP "   388 => "Buriram Utd"   389 => "1 - 0 0-0"   390 => "Jeonbuk Hm"   391 => "0-0"   392 => "491"   393 => "13.03 13:00"   394 => "JLK"   395 => "Vissel Kobe"   396 => "0 - 0 0-0"   397 => "Cerezo Osaka"   398 => "0-0"   399 => "490"   400 => "13.03 13:00"   401 => "JLK"   402 => "Shonan"   403 => "2 - 0 1-0"   404 => "Yokohama Marinos"   405 => "1-0"   406 => "489"   407 => "13.03 13:00"   408 => "JLK"   409 => "Shimizu"   410 => "1 - 0 0-0"   411 => "Iwata"   412 => "0-0"   413 => "488"   414 => "13.03 13:00"   415 => "JLK"   416 => "Sendai"   417 => "2 - 1 2-0"   418 => "Fc Tokyo"   419
=> "2-0"   420 => "487"   421 => "13.03 13:00"   422 => "JLK"   423 => "Sapporo"   424 => "0 - 0 0-0"   425 => "V Varen Nagasaki"   426 => "0-0"   427 => "486"   428 => "13.03 13:00"   429 => "JLK"   430 => "Nagoya"   431 => "2 - 1 2-1"   432 => "Oita Trinita"   433 => "2-1"   434 => "485"   435 => "13.03 13:00"   436 => "JLK"   437 => "Kashiwa"  438 => "0 - 1 0-0"   439 => "Sagan Tosu"   440 => "0-0"   441 => "484" 442 => "13.03 13:00"   443 => "JLK"   444 => "Gamba Osaka"   445 => "2
- 1 2-1"   446 => "Matsumoto Yamaga"   447 => "2-1"   448 => "483"   449 => "13.03 13:00"   450 => "AŞMP "   451 => "Ulsan"   452 => "1 - 0 0-0"   453 => "Shanghai Sipg"   454 => "0-0"   455 => "482"   456 => "13.03 13:00"   457 => "AŞMP "   458 => "Kawasaki"   459 => "1 - 0 0-0"   460 => "Sydney"   461 => "0-0"   462 => "480"   463 => "13.03 06:05"   464 => "MXC"   465 => "Monarcas"   466 => "0 - 1 0-0"   467
=> "Club Tijuana"   468 => "0-0"   469 => "479"   470 => "13.03 06:00"   471 => "CCC"   472 => "Tigres Uanl"   473 => "1 - 0 0-0"   474 => "Houston"   475 => "0-0"   476 => "478"   477 => "13.03 04:00"   478
=> "CCC"   479 => "Santos Laguna"   480 => "4 - 2 0-2"   481 => "New York"   482 => "0-2"   483 => "477"   484 => "13.03 04:00"   485 => "MXC"   486 => "Pumas Unam"   487 => "3 - 0 1-0"   488 => "Dorados"   489 => "1-0"   490 => "476"   491 => "13.03 03:30"   492 => "LKU"   493 => "Sporting Cristal"   494 => "1 - 1 1-1"   495 => "Godoy Cruz"   496 => "1-1"   497 => "475"   498 => "13.03 03:30"   499 => "LKU"   500 => "Nacional Asuncion"   501 => "1 - 0 0-0"   502 => "Atletico Mg" 503 => "0-0"   504 => "474"   505 => "13.03 03:30"   506 => "LKU"   507 => "Gremio"   508 => "0 - 1 0-1"   509 => "Libertad"   510 => "0-1"   511 => "473"   512 => "13.03 01:15"   513 => "LKU"   514 => "Palmeiras"   515 => "3 - 0 1-0"   516 => "Melgar"   517 => "1-0"   518 => "472"   519 => "13.03 01:15"   520 => "LKU"   521 => "Olimpia Asuncion"   522 => "1 - 1 1-1"   523 => "Univ De Concepcion"   524 => "1-1"   525 => "471"   526 => "13.03 01:15"   527 => "LKU"   528 => "Boca Juniors"   529 => "3 - 0 0-0"   530 => "Deportes Tolima"   531
=> "0-0"   532 => "191"   533 => "13.03 23:00"   534 => "ŞMP"   535 => "Bayern Münih"   536 => "1 - 3 1-1"   537 => "Liverpool"   538 => "1-1"   539 => "190"   540 => "13.03 23:00"   541 => "ŞMP"   542 => "Barcelona"   543 => "5 - 1 2-0"   544 => "Lyon"   545 => "2-0" ]

我有一个像这样的数组。我想以6爆炸6。我想将第一个6传递给数组的第一个新元素,并将第二个6传递给数组的第二个新元素,等等...

mod 6不起作用。

$counter = 0;
        $j = 0;
        $match_results = [];
        for ($i = 0; $i < count($tmp_match_results); $i++) {
            $match_results[$j][$counter] = $tmp_match_results[$i];
            $counter++;
            if ($counter > 5)
                $counter = 0;

            if ($i%6 == 0 && $i != 0)
                $j++;
        }
        var_dump($match_results);

1 个答案:

答案 0 :(得分:3)

尝试一下

var_dump(array_chunk($tmp_match_results,6));