cormanaz Posted May 2, 2010 Share Posted May 2, 2010 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 Link to comment https://forums.phpfreaks.com/topic/200470-how-to-get-a-row-out-of-an-indexed-2d-array/ Share on other sites More sharing options...
Mchl Posted May 2, 2010 Share Posted May 2, 2010 Almost same: $row = $multable[0]; Link to comment https://forums.phpfreaks.com/topic/200470-how-to-get-a-row-out-of-an-indexed-2d-array/#findComment-1051998 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.