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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.