Esempio n. 1
0
 function test_divide()
 {
     $data = array('name' => 'Tonya');
     list($keys, $values) = Arr::divide($data);
     $this->assertEquals(array('name'), $keys);
     $this->assertEquals(array('Tonya'), $values);
     list($keys, $values) = wpdevsclub_array_divide($data);
     $this->assertEquals(array('name'), $keys);
     $this->assertEquals(array('Tonya'), $values);
 }
Esempio n. 2
0
 /**
  * Divide an array into two arrays. One with keys and the other with values.
  *
  * @param  array  $array
  * @return array
  */
 function wpdevsclub_array_divide($array)
 {
     return Arr::divide($array);
 }