How to slice ArrayIterator into two?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2973202/mysql-fetch-array-expects-parameter-1-to-be-resource-boolean-given-in-select">mysql_fetch_array() expects parameter 1 to be resource, boolean given in select</a>  </p>
</blockquote>



<p>I've got this code</p>

<pre><code>$second_half = $items; //ArrayIterator Object;
$first_half = array_slice($second_half ,0,ceil(count($second_half)/2));
</code></pre>

<p>This gives the warning <strong>Warning: array_slice() expects parameter 1 to be array, object given</strong>
Is there a way to slice an ArrayIterator object in two?</p>

<p><strong>EDIT</strong> Basically I want one half of the unknown amount of items stored in <code>$first_half</code> and the remaining items <code>$second_half</code>; the result would be two ArrayIterator objects with two different sets of items.</p>
