初学者PHP - 在php中分离一个数组[关闭]

I'm a beginner at php and hopefully someone can help me. I have an array with 10 items and I need the first element to be 1 instead of zero. **I also need to have the array split into 2 columns beside each other with the first 5 elements in one column and the second 5 in the second. I've tried using html but could not get it to work. When I use the slice in php the last element(5) in the first column disappears.. So let's say my array is as follows:

$farmland=array("Duck","Fox","Goose","Cow","Cat","Rabbit","Bull","Mouse","Sheep","Goat");

I need it to appear like this:

Duck       Rabbit
Fox        Bull
Goose      Mouse
Cow        Sheep
Cat        Goat

Simplest way to split array into chunks is array_chunk:

$farmland = array("Duck","Fox","Goose","Cow","Cat","Rabbit","Bull","Mouse","Sheep","Goat");
$chunks = array_chunk($farmland, 5);  // get chunks with size of 5

print_r($chunks);

With array_chunk you can split the array an two

$my_spliy_array =  array_chunk($farmland,5)

the in $my_split_array[0] you have the first 5 element in $my_split_array[1] the last