php-reports icon indicating copy to clipboard operation
php-reports copied to clipboard

textarea with multiple = line breaks in array

Open glukinho opened this issue 8 years ago • 0 comments

Hi, I'm creating a PHP report. I put a variable header:

// VARIABLE: { name: "numbers", display: "номера", type: "textarea", multiple: true }

I put some numbers into textarea line by line:

123
456
789

I want them to appear as PHP array:

$numbers = array( 0 => '123', 1 => '456', 2 => '789');

The array appears, but I see some line breaks in its elements. I copy from debug mode:

$numbers = array (
  0 => '123
',
  1 => '456
',
  2 => '789',
);

It seems parsing textarea to array goes bad.

Is it a bug or I misunderstood something? Can provide some additional info...

glukinho avatar Dec 27 '17 17:12 glukinho