php数组循环问题

I create and populate an array like this.

  var randomnumber=new Array(); 

    for(var i=1; i<=10; i++)
    {
             randomnumber[i]=Math.random();

}

Then i put the array into a hidden input

    document.getElementById("field").value = randomnumber;

Then i call the file that processes that file. I get this error: Fatal error: Cannot use string offset as an array

$myArray=$_GET['field'];


for($i=0;$i<10;$i++)
{
    for($j=0;$j<10;$j++)
    {
        echo $myArray[$i][$j];////error is on this line
    }

}

How else would I loop through a 2d array?

Try this code:

foreach($myArray as $i)
{
    foreach($i as $j)
    {
        echo $j;
    }
}