User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 455,985 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,759 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 353 | Replies: 2
Reply
Join Date: Dec 2007
Posts: 4
Reputation: EmpireZ is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
EmpireZ EmpireZ is offline Offline
Newbie Poster

Text Box

  #1  
Dec 3rd, 2007
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?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2006
Location: the Netherlands
Posts: 1,818
Reputation: niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all 
Rep Power: 11
Solved Threads: 189
niek_e's Avatar
niek_e niek_e is offline Offline
Posting Virtuoso

Re: Text Box

  #2  
Dec 3rd, 2007
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
Last edited by niek_e : Dec 3rd, 2007 at 6:04 am. Reason: added link
Want better/more replies to your questions? Wrap your code in [code] [/code] tags!
do NOT pm me for help, in the best case, you'll get ignored
Reply With Quote  
Join Date: Dec 2007
Posts: 4
Reputation: EmpireZ is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
EmpireZ EmpireZ is offline Offline
Newbie Poster

Re: Text Box

  #3  
Dec 3rd, 2007
Thanks for this Niek_e !

Exactly what I needed.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 9:28 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC