Skip to content
Advertisement

Div text won’t show up as it should

I have a problem with my div, when I’m trying to put text inside a div using <?php echo $uin->text; ?> it doesn’t show up like I want it to.

So if it worked it should have looked like this:

JavaScript

but for me it always shows up like this

JavaScript

Here is the codes I’ve tried:

JavaScript

So I don’t know what I’m doing wrong but if there’s like 3 lines between the top text and the middle text in $uin->text it doesn’t show those line, everything just gets on the same line.

Advertisement

Answer

Like @u_mulder and @ThrowBackDewd said on the top, use nl2br() function.

In your case, it would be like this :

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement