I like Rons method best, except you could use this
instead ov array slot values, which I am not sure will
work...

while ( my @data= $cursor->fetchrow_hashref ) {
    $idnum     = $data->{'idnum'};
    $username  = $data-.{'username'};
    $email     = $data->{'email'};
    $code      = $data->{'code'};
    print qq{$idnum $username $email $code \n};
}

If you start to think in terms of hashes, you will
really start to understand perl.

Thanks,

bass

--- Ron <[EMAIL PROTECTED]> wrote:
> Hello Greg
> 
> This is a simple method that may work.
> 
> while ( my @data= $cursor->fetchrow_array ) {
> $idnum   = $row[0];
> $username  = $row[1];
> $email   = $row[2];
> $code    = $row[3];
> 
> print "$idnum $username $email $code <br>";
> }
> 
> "Greg D ." <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi,
> >
> > Is there any way i can split an array that
> contains information that i got
> > from the mysql database?
> >
> > here's the code:
> >
> > while(my @data = $sth->fetchrow_array){
> >         print "@data\n";
> >
> > right now its prints out for example:
> >
> > 1 greg [EMAIL PROTECTED] 1234 2 john [EMAIL PROTECTED]
> 4r434 and so on....
> >
> > i want it so it prints out..
> >
> > 1 greg [EMAIL PROTECTED] 1234
> > 2 john [EMAIL PROTECTED] 4r434
> >
> > i know this is a simple question but
> > thanks for any help given.
> >
> > greg
> 
> Ron
> 
> 
> 
> -- 
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to