2017 © Pedro Peláez
 

library group

image

jsnlib/group

  • Friday, March 30, 2018
  • by fdjkgh580
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

jsnlib-group

假設我們有這樣的陣列, (*1)

$ary = array('a', 'b', 'c', 'd', 'e', 'f', 'g');

一、指定每個盒子最多有多少個

$result = Jsnlib\Group::length($ary, 3);
print_r($result);

/*Array
(
    [0] => Array
        (
            [0] => a
            [1] => b
            [2] => c
        )

    [1] => Array
        (
            [0] => d
            [1] => e
            [2] => f
        )

    [2] => Array
        (
            [0] => g
        )

)*/

二、指定總共有多少個盒子

````php $result = Jsnlib\Group::each($ary, 3); print_r($result);, (*2)

/* Array ( [0] => Array ( [0] => a [1] => d [2] => g ), (*3)

[1] => Array
    (
        [0] => b
        [1] => e
    )

[2] => Array
    (
        [0] => c
        [1] => f
    )

) */ ````, (*4)

The Versions

30/03 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

group

30/03 2018

1.1.0

1.1.0.0

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

group

29/03 2018

1.0.2

1.0.2.0

  Sources   Download

MIT

The Requires

  • php >=5.2.4

 

array object arrayobject convert

09/03 2018

1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

  • php >=5.2.4

 

array object arrayobject convert

09/03 2018

1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

  • php >=5.2.4

 

array object arrayobject convert