i have the following array

```
$block = array(
          **********,
          *****,
          **********,
          ***,
          ********);

```

Assuming max length of each array would be 10

I'm trying to insert new value in that array so my output would be as follows:

```
**********
*****00000
**********
***0000000
********00

```

So the following are my codes:

```
foreach($block as $key=>$newblock)
{
    $counter = 10 - strlen($newblock); 
    if ($counter > 0)
    {
      for($x=0; $x < $counter; $x++)
      {
          $block[$key] = implode("0",$newblock);
      }
    }
}

foreach($block as $x)
{
    print $x;
}

```

The codes seems not working..