Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Newbie: Format a text from input box.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
NathanS
Smarty Rookie


Joined: 19 Sep 2005
Posts: 14

PostPosted: Tue Nov 01, 2005 2:30 pm    Post subject: Newbie: Format a text from input box. Reply with quote

I want to allow a person to put in some text in a text box then when I go to display it I want the line breaks and spacing to look the same...

What can I do for this? in smarty or php?

thanks,
Nathan

P.S. I searched but did not find anything.
Back to top
View user's profile Send private message Visit poster's website
NathanS
Smarty Rookie


Joined: 19 Sep 2005
Posts: 14

PostPosted: Tue Nov 01, 2005 2:54 pm    Post subject: A friend told me part of the answer Reply with quote

I can do the line breaks doing the following..

{$myvariable|nl2br}

Where $myvariable is the variable used...

Thanks,
Nathan

P.S. if anyone knows how to replace the spaces.. hmmm wait I wonder if it is even storing the spaces in the database when I insert it... my not be... therefore nothing would work until I fix that.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP