nootkan Posted August 1, 2014 Share Posted August 1, 2014 On page 19 you state that "as the definition also indicates, the second argument has a default value of true" yet I see the word false inside the parenthesis: nl2br("Some Text", false); Is this a type O? Shouldn't it say true? I'm not sure I understand what is happening here. Link to comment Share on other sites More sharing options...
Larry Posted August 2, 2014 Share Posted August 2, 2014 Sorry for the confusion. A default value of true means you don't need to specify true as a value for that argument if that's what you want. So the example uses false to demonstrate how you would change the default behavior. Link to comment Share on other sites More sharing options...
nootkan Posted August 2, 2014 Author Share Posted August 2, 2014 So what is the true statement then in the multiple arg example? Would you just change the last arg to read true? What would be the purpose of the single arg example that reads "nl2br("Some Text"); ? Sorry for my constant questioning but I don't learn very well by just reading I usually need someone to actually explain what I've read to fully grasp it. Hopefully I will not be a pain in the butt for you but I do want to learn php if I have the iq to do so. Link to comment Share on other sites More sharing options...
Larry Posted August 3, 2014 Share Posted August 3, 2014 When you have specific questions like these, that aren't strictly to the book, I'd recommend you do two things: 1. Experiment with the code for yourself to see what happens. (Make sure you look at the source code, too.) 2. Check out the PHP manual for additional information and context. I'm happy to help, of course, but worry that if just reading what I wrote doesn't do it for you, then having me explain it again may not either and another source (or two) might make a bigger difference. Link to comment Share on other sites More sharing options...
nootkan Posted August 3, 2014 Author Share Posted August 3, 2014 Those questions do pertain to the book. I took those statements directly from the book. Just trying to understand what constitutes a multiple arg as opposed to a single one as I'm not sure I understand the difference. Sorry to have bothered you. Didn't mean to take advantage of your time. Link to comment Share on other sites More sharing options...
Larry Posted August 3, 2014 Share Posted August 3, 2014 Really, I'm here to help. It's fine if you want to ask questions. I know that you're asking about something that's in the book. But it's also in the manual. I would recommend you check out the manual pages so that you're using more than one source. Sometimes that's helpful: getting other context. Especially, as you said, when sometimes reading alone won't cut it. Again, I'm here to help. That's why I dedicate my time and money to these forums. It's absolutely no bother. But you'll do better in the long run if you also experiment with code and read manual pages. Also, I normally check the forums 3 days per week, so sometimes it'll be a couple of days before you get a reply (and if you question my dedication to helping, I'm currently answering these while on vacation with my family, so I really, really am happy to help here). But, short answer... Single argument: someFunction(argument); Multiple arguments: someFunction(arg1, arg2); Link to comment Share on other sites More sharing options...
nootkan Posted August 3, 2014 Author Share Posted August 3, 2014 I wasn't questioning your dedication, sorry if that is how I came accross. Just merely trying to confirm what I am learning from the book and I have been told by a lot of people (family included) that I ask too many questions to the point of irritation. I was just trying to apologize for my persistence. Your examples above did it for me thanks. The single argument was the true one and the multiple argument was the false which clears up the usage of false instead of true. They're used together I am assuming. Have a great holiday! Link to comment Share on other sites More sharing options...
Recommended Posts