return character

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Foolsworld
Forum Newbie
Posts: 3
Joined: Sat May 10, 2008 10:56 pm

return character

Post by Foolsworld »

I do not know ANYTHING about programming but have learned to use dreamwaver over the past years. Here is my problem which is probably laughable for most of you:
I don't even know if this is the information you need to solve my problem. Here is the script:

<dt><?php echo $row_rsPlayers['playertourniresults']; ?></dt>
</dl></td>

I want that if somebody submits a list of items using the ENTER character into a form to be read from the database as such and output as such.

item 1
item 2
item 3
etc.

Currently, the results on my website would look like this:

item 1 item 2 item 3

although it appears like this:

item 1
item 2
item 3
etc.

in the database

I hope that makes any sense...

Thanks for the help
nowaydown1
Forum Contributor
Posts: 169
Joined: Sun Apr 27, 2008 1:22 am

Re: return character

Post by nowaydown1 »

Sounds like what you want to do is convert the return characters to an appropriate html representation. Trying wrapping your output with nl2br() and see what that does:

Code: Select all

 
<?php echo nl2br($row_rsPlayers['playertourniresults']); ?>
 
Foolsworld
Forum Newbie
Posts: 3
Joined: Sat May 10, 2008 10:56 pm

Re: return character

Post by Foolsworld »

Sweet. Makes my day! Thanks a lot for the quick response.
Post Reply