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
[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:
]; 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-
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];
[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
[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,
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