I am generating a dropdown options list from a PHP variable. Adding "\r\n" to end of each line in the variable data does not make new lines, when the dropdown is rendered in the form. I only get one long string as a selection option, instead of a list of multiple selection options.
How can I get the new lines show in the selection list?
I have Linux and Firefox browser.
How can I get the new lines show in the selection list?
I have Linux and Firefox browser.
SOLVED: the drop select options show correctly, when the PHP variable is returned as an array. You do not need to explode the array into a string at all, thus avoiding the new line character issue.
You need to login to be able to post a reply.