On Wednesday, May 1, 2002, at 03:43  PM, Ron 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>";
> }

that may be his original problem - he was printing to a web page.
If that was the case, his code was almost right. he just needed to use <br>
  instead of \n


> "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";

if this is going out to a web page, try:
while(my @data = $sth->fetchrow_array){
         print "@data<br>";

>> 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]
>

Reply via email to