Next line text in database but not result

Goodday, I have a database phpmyadmin where I have $title with text in line

  • service 1
  • service 2
    it properly shows next line,

however when display in .php reult on the page it does not go to the line it does

  • service 1 - service 2

this happend when I passed from settings v.5.6 to v.7.2

am using php settings v.7.2
database phpmyadmin
result is $title = $myts->makeTboxData4Show($title);

$title

thank you for any help

It sounds like you want a newline character to show up as a line break in your HTML page; this won’t happen automatically. If you view the page source, can you see the new line in the title there?

looking on the database, there is no line break but it is on the next line. Before when on V5.6 the result showed no issue but since it does not take the new line into account.
If I insert in the data - service 1 < br / > or \ n the text shows the code and it does not do anything.

the result is - service 1 < br / > - service 2 < br / >

the database field is title … text … utf8 …_general_ci …No None
When I do update the field it does show

  • Service 1\r\n- Service 2\r\n- Service 3

there is no line break but it is on the next line

That’s what a line break looks like. Your text is on the next line. That’s a line break.

What does the title look like in the source code of your rendered web page?

Thats where it does not work anymore.
result is $title = $myts->makeTboxData4Show($title);

when I make the $title it shows with no line

If there’s a line break in your database but no line break in the source code of your web page, then something in your code is stripping out the line break. You need to follow your code through and look to see where the value is being changed. The function makeTboxData4Show is probably a good place to start.

Sponsor our Newsletter | Privacy Policy | Terms of Service