richarro1234 Posted September 10, 2007 Share Posted September 10, 2007 Hey all, just wondering. how do i make a text field with multiple words init that will be saved in the database with a <BR> after each word? heres the plan: i need a text field where i can seperate words by a ; and when i click submit it saves it in the database with <BR>. OR have the words seperated by ; again, but then show up on the website as a list. so i could have something like: bananas; oranges; apples; kiwi and then it show on the webpage like: bananas oranges apples kiwi (as a list) How do i go about doin that? Anyone able to help me? Thanks in advanced Rich Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted September 10, 2007 Share Posted September 10, 2007 Most of the time I just save the data as-is and only perform substitutions when re-displaying it. In either case: $txt = str_replace(";", "<br>", $txt); Quote Link to comment Share on other sites More sharing options...
richarro1234 Posted September 10, 2007 Author Share Posted September 10, 2007 Oh yeah didnt think of doin it like that. Thanks for the help roopurt18 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.