Jump to content

How to get a row out of an indexed 2D array


cormanaz

Recommended Posts

Greetings.  I've been searching around on this for about 30 min and can't find an answer.  Suppose I've got an array generated like this:

    for ($k=1;$k<=10;$k++) {

        for ($j=1;$j<=10;$j++) {

            $multable[$k][$j] = $j*$k;

        }

    }

How do I extract "row" 0 of this array into a one dimensional array?  If this would perl, I would say @row=@{ multable[0]}, but how to do this in PHP?

 

Thanks,

 

Steve

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.