0

Hello,
If am entering data as
"hi
this
is
for
test"
as my input to

<textarea>

but while displaying it, it is giving me as one sentence .
Help me out with this.

6
Contributors
8
Replies
11
Views
4 Years
Discussion Span
Last Post by Priti_P
0

Hi Priti_P,

A newline escape character would do for an inline and your sample would also do it. example:

<?php

$myString = "MULTILINE:
hi
this
is
for
test";

echo "<textarea rows='6'>" . $myString . "</textarea>";

$myString2 = "INLINE:\nhi\nthis\nis\nfor\ntest";

echo "<textarea rows='6'>" . $myString2 . "</textarea>";
0

Out of topic:
I guess with the bb code, and a well crafted keywords in his sig, he is.

Man, I hate spammers.

@lixamaga: Please, people are trying to learn, and share knowledge here; not look at a non-sensical marketing junk.

0

he guys ..
thanks a lot..!!
nl2br worked in my case.
thanks again.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.