Jump to content

Writing data to textarea control


ksmatthews

Recommended Posts

Hi All,

 

I am having problems writing to the textarea HTML object. Basically I am losing my new line char

and the text looks awful and unintelligible.

 

How can I get my new lines appended at the end so that each line is separate.

 

Here is some code ...

 

Creating EACH data line:

 

$arrCsvRow = array(

$arrTags['DATE_UPLOADED'],

$arrTags['SCAN_NUMBER'],

$arrTags['OPERATOR'],

$arrTags['REFERENCE'],

$arrTags['CURRENCY'],

$arrTags['GOODS'],

$arrTags['VAT'],

$arrTags['TOTAL'],

$arrTags['PAID_TITLE']

);

$arrCsv[] = implode(',', $arrCsvRow);

 

etc ....  

 

Dumping it all at the end ...

 

$arrTags['CSV_OUTPUT'] = implode("\n", $arrCsv);

 

Note: $arrTags['CSV_OUTPUT'] is added to  a text area control WITHIN a template

 

Any advice appreciated,

 

regards,

 

ksmatthews

 

 

Link to comment
https://forums.phpfreaks.com/topic/210308-writing-data-to-textarea-control/
Share on other sites

Should get this ...

 

08-07-2010,277,CLICKATELL,CLICKATELL_June_Oct_09,GBP,33179.70,0.00,33179.70,Paid on 10/02/2010

08-07-2010,182,IPX,IPX_Jul09_23852,EUR,1654.55,0.00,1654.55,Paid on 02/12/2009

10-06-2010,406,NETM,07091486,EUR,721.17,0.00,721.17,Paid on 24/03/2010

08-04-2010,342,COMEXME,Comexme_July09 - Dec09,USD,2131.11,0.00,2131.11,Paid on 08/04/2010

 

But I get this ...

 

08-07-2010,277,CLICKATELL,CLICKATELL_June_Oct_09,GBP,33179.70,0.00,33179.70,Paid on 10/02/201008-07-2010,182,IPX,IPX_Jul09_23852,EUR,1654.55,0.00,1654.55,Paid on 02/12/200910-06-2010,406,NETM,07091486,EUR,721.17,0.00,721.17,Paid on 24/03/201008-04-2010,342,COMEXME,Comexme_July09 - Dec09,USD,2131.11,0.00,2131.11,Paid on 08/04/2010

 

WHY ? Is this a CSS issue ?

 

Steven M

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.