I am using something similiar to
echo ereg_replace(" ","<p>",$row_test('review'));
to add a <p> at "3 spaces" in a string stored in a database.
This string is entered by a web form that I wan't users just to hit return to have it show when the string is echoed back out.
Why do "returns" not show when echoed out? In the database the "return" exists.
Is there any other character I can replace (one that represents the return) with ereg_replace? or another easier way?
CR Returns entered in webform don't reflect in echoed string
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
The easiest way is to use nl2br() on the output. This will add HTML break tags (<br />) next to line break characters (\n).
Mac
Mac