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?

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

Thanks for this Niek_e !

Exactly what I needed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.