Php converts the br line breaks in html to line breaks in text input. PHP has a very good function: nl2br (), which converts the line break in the text box to the br on the HTML page. but how can we convert the br line break in html to the line
At the beginning of the concept is only a little vague, not too concerned about, the results of a search only found that this thing is too interesting, not only has an interesting story, but also has a lot of doorways, but also brought up some of
The first two days to study the textarea of the intuitive line of the line, very complex AH:
Intuitive line how to take not only to see the size of the cols, but also to see how the page encoding.
cols= "30" textarea, in fact, each row can hold 29
Today, I encountered a textarea line feed problem in the project, which was not solved after debugging for half a day. You need to convert the carriage return text in textarea into a br and store it in the database. The following is my solution to
New contact of the Ape (with PHP development environment and PHP simple algorithm problem)--2015.07 last half month, 2015.07 the first half month
Php&mysql
Development environment Preparation
SAE http://sae.sina.com.cn/
GitHub
Today, I encountered a textarea line feed problem in the project, which was not solved after debugging for half a day. You need to convert the line breaks in textarea into and save them to the database.
The following is my solution to this
Word-wrap: Allows splitting of long, indivisible words and wrapping to the next line. (same effect in English and Chinese)Word-wrap has two values:1. Word-wrap:normal: line breaks only allowed hyphenation points (the browser keeps the default
PHP has a very good function: NL2BR (), the text box to convert the line to the HTML page
, but how to implement the HTML
is the newline character converted to a line break in a text box? Here are a few ways to help you solve this problem.
The PHP
Word-wrap: Allows splitting of long, indivisible words and wrapping to the next line. (same effect in English and Chinese)Word-wrap has two values:1. Word-wrap:normal: line breaks only allowed hyphenation points (the browser keeps the default
Two problems: The 1.mysql does not support line-wrapping, textarea in the return of the incoming and then came out to become a space.The 2.JTable render default is inherited JLabel, and does not support line-wrapping display. In order to achieve a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.