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 Link to comment https://forums.phpfreaks.com/topic/68760-solved-how-do-i/ 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); Link to comment https://forums.phpfreaks.com/topic/68760-solved-how-do-i/#findComment-345636 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 Link to comment https://forums.phpfreaks.com/topic/68760-solved-how-do-i/#findComment-345639 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.