Horje
php slice array in half Code Example
php slice array in half
<?php
$input_array = array('a', 'b', 'c', 'd', 'e', 'f');
$arrays = array_chunk($input_array, 3);

foreach ($arrays as $array_num => $array) {
  echo "Array $array_num:\n";
  foreach ($array as $item_num => $item) {
    echo "  Item $item_num: $item\n";
  }
}
php slice array in half
$halved = array_chunk($books, ceil(count($books)/2));




Php

Related
delete folder laravel Code Example delete folder laravel Code Example
limit text length in php Code Example limit text length in php Code Example
laravel select only one word from string Code Example laravel select only one word from string Code Example
genrate file name in php Code Example genrate file name in php Code Example
truncate url rewrites magento 2 database Code Example truncate url rewrites magento 2 database Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8