PHP Code Echo New Line - Php

How to insert line breaks using echo statement in PHP?

Snippet Code


  
Rate this page :
  [ 0 votes]

The below code helps you to insert line breaks before all newlines in a string using nl2br function.

<?php echo nl2br("Welcome to\nHscripts.com"); ?>

Tags


Ask Questions

Ask Question