| |

VerySource

 Forgot password?
 Register
Search
View: 4019|Reply: 13

PHP returns multiple paragraphs of text from mysql after each paragraph with the
tag How to achieve the first lin

[Copy link]

4

Threads

14

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-1-9 06:20:01
| Show all posts |Read mode
The string text returned by php from the mysql database is added with a <br /> tag after each paragraph. How does this indent in CSS?
And the returned text doesn't have a <P> </ P> tag! Is there any other way for everyone?
Reply

Use magic Report

0

Threads

27

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-1-9 18:18:02
| Show all posts
Impossible, it was added to your program, or it was originally in the database
Reply

Use magic Report

0

Threads

24

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 China

Post time: 2020-1-10 01:00:01
| Show all posts
1. <br> Must be produced by your program replacing\r\n.
2. Use text-indent: XXpx;
Reply

Use magic Report

4

Threads

14

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

 Author| Post time: 2020-1-11 08:27:02
| Show all posts
Will獠牙精英:
How to use text-indent: XXpx ;? I don't know much? Where is it used? Can you be specific?
Reply

Use magic Report

4

Threads

14

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

 Author| Post time: 2020-1-11 09:54:02
| Show all posts
When the article was imported into mysql, I did not process it. When exporting from mysql, I used the following process.
$ text = nl2br ($ text); <br /> tags are automatically added after each paragraph of string text during output, but I do n’t know how to achieve indentation?
Reply

Use magic Report

0

Threads

24

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 China

Post time: 2020-1-11 15:54:01
| Show all posts
<span style = "text-indent: XXpx;"> Content .... </ span>
Reply

Use magic Report

0

Threads

24

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 China

Post time: 2020-1-11 16:00:01
| Show all posts
<br /> is produced by nl2br ().
Reply

Use magic Report

4

Threads

14

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

 Author| Post time: 2020-1-19 09:18:01
| Show all posts
<span style = "text-indent: XXpx;"> Content .... </ span>
Method does not work


Because the output is a string, the string is divided into paragraphs, and each paragraph has no <P> tag, only the <BR /> tag.
I want to indent every character of this string by 2 characters. In fact, if you can add <P> </ P> to each segment, it is easy to implement, just define the <P> tag. The problem is that there is no <p> tag.
Reply

Use magic Report

4

Threads

14

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

 Author| Post time: 2020-1-19 10:09:01
| Show all posts
If the following is the source code:

The mid- and long-term plan for national nuclear power has just been "passed in principle", and the text of the plan has not yet been made public. In the central region, the competition for "the first item of nuclear power inland" has been in full swing. <br />
<br />
    "All the people in charge went to the National Development and Reform Commission for a meeting." On April 5, when a reporter called the Planning Office of China Electric Engineering Consulting Group Corporation to conduct an interview on nuclear power development, a person from the department told reporters. <br />
<br />
    This consultant company was in charge of planning and selecting nuclear power plant projects in Hunan, Hubei, and Jiangxi not long ago. At this time, all responsible persons were dispatched to participate in the "One Project Evaluation Meeting" of the National Development and Reform Commission. It was said that this meeting was "as important as nuclear power development issues" and required participants that "all communication tools such as mobile phones should not be brought into the venue ". <br />
<br />
    But he declined to say what kind of project it was. <br />
Reply

Use magic Report

0

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-19 12:18:02
| Show all posts
Did you replace it once during form submission processing.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list