• PHP Video Tutorials

PHP - Threaded::chunk() Function



Threaded::chunk - Manipulation.

Syntax

public array Threaded::chunk( integer $size , boolean $preserve )

Threaded::chunk can fetch a chunk of objects property table of a given size, optionally preserving keys. It can return an array of items from the object's property table.

Example

<?php
   $safe = new Threaded();

   while(count($safe) < 10) {
      $safe[] = count($safe);
   }
   var_dump($safe->chunk(5));
?>
php_function_reference.htm
Advertisements