I'm splitting an array into five different arrays where all the first element in an array chunk goes to array $first and second to $second and so on, here's my full code. please help me.

```
<?php
$input = array("1", "2", "3", "4", "5", "10", "20", "30", "40", "50");

      $chunks = array_chunk($input, 5);

        $count = sizeof($chunks);
        $first = array();
        $second = array();
        $third = array();
        $fourth = array();
        $fifth = array();

       for($i=0;$i<$count;$i++) 
      {
        $new = $chunks[$i];
        for($j=0;$j<5;$j++)
        {
          if($j=0)
          {
          $new[$j] = $first[$i]; 
          }
          elseif($j=1)
          {
          $new[$j] = $second[$i]; 
          }
          elseif($j=2)
          {
          $new[$j] = $third[$i]; 
          }

          elseif($j=3)
          {
          $new[$j] = $fourth[$i]; 
          }

          elseif($j=4)
          {
          $new[$j] = $fifth[$i]; 
          }
          else
          {
          echo "error";
          }

        }

      }

        echo "<pre>";
        print_r($first);
        print_r($second);
        print_r($third);
        print_r($fourth);
        print_r($fifth);
    ?>

```

I tried many ways but always end up in a infinite page loads on and on, and even crashes my firefox. I'm sitting with this for a whole day now, i just can't figure it out.