in reply to Array of Arrays Question
Of course, you can simplify this by:#original (for the 1st column): $y = 0; for ($x = 0; $x < 15; $x++) { push @newips, $ips[$x][$y]; } #new code, gets the second column $y = 1; for ($x = 0; $x < 15; $x++) { push @num, $ips[$x][$y]; }
(And there's many other optimizations/simplifications that could be done as well, but probably not worth going into at this time).for ($x = 0; $x < 15; $x++) { push @newips, $ips[$x][0]; push @num, $ips[$x][1]; }
-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important
|
|---|