Jump to content

For my own curiousity: nl2br()


suttercain

Recommended Posts

I understand this:

 

<?php
$string = "John Doe \n Mary Doe \n Steven Doe \n";

echo $string; // echoes John Doe Mary Doe Steven Doe
echo nl2br($string); echoes John Doe
                                      Mary Doe
                                      Steven Doe
?>

 

My question is this:

Is it possible to have the results looks as they did in echo nl2br($string); without using the nl2br or the <br> tag?

 

 

Just curious.

 

SC

 

Link to comment
https://forums.phpfreaks.com/topic/48988-for-my-own-curiousity-nl2br/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.