Re: Two Dimensional Array Problem

2005-06-05 Thread Wiggins d'Anconia
Always group reply so others can help and be helped, and to avoid getting accidentally ignored. "Because it's up-side down. Why is that? It makes replies harder to read. Why not? Please don't top-post." - Sherm Pendley, Mac OS X list Aaron Huber wrote: > > On 6/3/05, Wiggins d'Anconia <[EMAIL PR

Re: Two Dimensional Array Problem

2005-06-03 Thread Chris Charley
[snip] Hi Brian, I usually deal with multidimensional arrays this way: $i = 0; while (@results = $sth->fetchrow_array ()) { $x = $results[0]; $y = $results[1]; @points = ($x, $y); $data[$i] = [EMAIL PROTECTED]; $i++; } Just a note about a possible problem with the statement:

RE: Two Dimensional Array Problem

2005-06-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
]; beginners@perl.org > Subject: RE: Two Dimensional Array Problem > > > [EMAIL PROTECTED] wrote: >> I am trying to send the output of a mysql query to a two dimensional >> array. >> >> This is what I've tried using push. >> >> while (@results = $sth-

RE: Two Dimensional Array Problem

2005-06-03 Thread brian . barto
ubject: RE: Two Dimensional Array Problem [EMAIL PROTECTED] wrote: > I am trying to send the output of a mysql query to a two dimensional > array. > > This is what I've tried using push. > > while (@results = $sth->fetchrow_array ()) > { > $x = $results[0];

Re: Two Dimensional Array Problem

2005-06-03 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: > I am trying to send the output of a mysql query to a two dimensional array. > > This is what I've tried using push. > > while (@results = $sth->fetchrow_array ()) > { > $x = $results[0]; > $y = $results[1]; > push (@data,[$x],[$y]); > } > > However, I don't

RE: Two Dimensional Array Problem

2005-06-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: > I am trying to send the output of a mysql query to a two dimensional > array. > > This is what I've tried using push. > > while (@results = $sth->fetchrow_array ()) > { > $x = $results[0]; > $y = $results[1]; > push (@data,[$x],[$y]); push( @data,

RE: Two Dimensional Array Problem

2005-06-03 Thread brian . barto
Looks like you're pushing a list on to another list. In effect, appending one to the other. @data would be the first list. The second list would be '$x, $y'. Variables in a comma delimited fashion is the same as a list or an array. I usually deal with multidimensional arrays this way: $i = 0; whi