something like this: for ($x=0; $x<3; $x++) { $b[$x]=$a[$x]; } PHP: now you should have first 3 data of array $a[] into array $b[]
Rather than looping through the array, you can simply use the array_slice function to do the same; <?php $a=array('a','b','c','d','e','f','g'); $b = (array_slice($a, 0, 3); ?> PHP: Reference: http://www.php.net/manual/en/function.array-slice.php
array_slice is the correct and more efficient method saves you lines of code as well. see lukeg32's post. hands up.
Good call. Always try to keep php.net handy so you can find those efficiencies. They really do add up over time in maintenance and cpu load.