The best way to look up php functions is by using the search engine on the php site at http://us.php.net/
it's a very well written manual. This is what comes up when you look up nl2br() http://us.php.net/manual/en/function.nl2br.php Also, this is the main resource that I learned php with: http://devzone.zend.com/node/view/id/627 It's a very good set of like 10 different tutorials for php beginners good luck On Oct 8, 12:59 am, Cody Sortore <[EMAIL PROTECTED]> wrote: > I've got a decent handle on PHP at least enough to get by. I'm not > trying to create some social networking site or anything, just a very > simple site that has some user comments and what not on it. > > I'll admit I've never gone through and actually "learned" PHP most of > what I've done was starting with PHP-Nuke modifying things, and adding > in modules to that. Then I moved to WordPress for most of my sites > and have modified the site, modified plugins, and made a few > templates. And I have a few reference books... which aren't always > much help if you don't know the terminology. > > I'm sorry if I don't have a huge amount of knowledge when it comes to > terminology, and there's a lot of very basic things such as the nl2br > kind of stuff that I've missed. That's what I'm learning, and I'm > very glad that there are places like this that I can learn and build > my skills. > > I've created some basic sites before with straight out PHP and MySQL > it's tedious and no fun... I don't code for a living, just need some > things to work the way I want them to and CakePHP offers that as it is > much easier to get into than PHP. Personally I learn best by actually > doing things, making mistakes, and asking others more experienced what > I did wrong. I'm sorry if my n00bish questions are tedious and time > consuming for you... you don't owe me anything or have to spend the > time answering them though. I'm glad that there are people out there > willing to help me and answer these questions for me so that I can > learn though since tutorials, and books have only taken me so far... > sometimes leaving off the basics you might need for simple forms. > > On Oct 8, 1:42 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote: > > > I hope I do not seem mean but I recommend learning the php language a > > bit better before getting into a framework. > > > You sound like you are trying to create a form, and you want the data > > entered in it to be displayed with <br /> tags instead of newlines > > which does not output on the browser. Put the content through the > > nl2br() function before outputting it to the browser. > > > when you hit "enter" in an editor, what it creates is called a > > "newline". As you seem to know, if you want a line-break outputted on > > the browser, you need <br /> instead of the newline. That is what > > nl2br() is for. > > > On Oct 7, 10:52 pm, Cody Sortore <[EMAIL PROTECTED]> wrote: > > > > Thanks, I like the nl2br solution. > > > > When you say processing and filtering you do mean like data validation > > > in the model right? If so yes... if you're talking about something > > > else... uh probably not. Well I do have some $paginate restrictions > > > in the controller (including a function that only displays approved > > > comments). > > > > On Oct 7, 9:20 pm, BrendonKoz <[EMAIL PROTECTED]> wrote: > > > > > Via PHP code, you could also process the data through PHP's nl2br() > > > > function, which inserts <br /> tags prior to the newline (the newline > > > > is not removed). Hopefully you're already processing and filtering > > > > the user data anyway. > > > > > On Oct 7, 7:33 pm, Cody Sortore <[EMAIL PROTECTED]> wrote: > > > > > > Okay, I know I sound like a complete n00b right now, and that's fine > > > > > because I am. I've really only made applications for myself so far so > > > > > putting in <br /> tags is no problem... but now that I'm trying to > > > > > make something for other people to use how to I make it so that when > > > > > they hit "enter" it will automatically put in a <br /> tag for me? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
