doutang2382 2016-09-09 13:00
浏览 46
已采纳

如何在PHP中回显多行?

I am 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 we multi line this?

  • 写回答

3条回答 默认 最新

  • doupai8533 2016-09-09 13:06
    关注

    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;
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?