954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Text Box

Hello,

I am trying to figure out how to have the data pulled from a input text box field so it displays as columns.
Right now, when I hit enter to add a new line in the text box and look at it where it suppose to be displayed, it is all on one line.

Example right now it is:

example1 example2 example3

I want it to display as

example 1
example 2
example 3

Anyone know how to achieve this in my php code?

EmpireZ
Newbie Poster
4 posts since Dec 2007
Reputation Points: 10
Solved Threads: 0
 

You could look at the strtok() function. This function takes a string and a character as arguments, splitting the string when it encounters the char.

Niek

[edit]
Here's a link with the exact program you want

Nick Evan
Not a Llama
Moderator
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
 

Thanks for this Niek_e !

Exactly what I needed.

EmpireZ
Newbie Poster
4 posts since Dec 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You