Louchin Var Carias Cejar Louchin Var Carias Cejar - 1 year ago 155
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']; ?>

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

Answer Source

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

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

This function will wrap your long string into multiline.


You can use this css for your div

word-wrap: break-word;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download