Louchin Var Carias Cejar Louchin Var Carias Cejar - 2 months ago 7
HTML Question

How to echo multi line in php?

Having a hard time where this code

<div class = "col-md-8">
<?php echo $row['actualpost']; ?>
</div>


is overlapping the column in a div, How can multi line this?

Answer

You can wrap your string using wordwrap() function like this:

wordwrap($row['actualpost'], 10, '<br>');

This function will wrap your long string into multiline.

Or

You can use this css for your div

word-wrap: break-word;