Jump to content
Larry Ullman's Book Forums

Fergal

Members
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Fergal

  • Rank
    Newbie
  1. I've just seen in the book that there is another way of doing this and that is by applying the nl2br function after the strip_tags function, as in; $string = strip_tags($string); $string = nl2br($string);
  2. I've been reading the section of the book on how to use the following functions; htmlspecialchars() htmlentities() strip_tags() My question is, is it possible to use those functions to deal with HTML tags included in text entered into a form, but still maintain the line breaks in the form data. For example if the following was entered into a textarea on a form; How could the functions above be used so that when the data is printed to the browser it looks like this; Thanks!
  3. Thanks Larry. I'm deliberately trying to break the scripts I write now and it has really helped my understanding of the book's content.
  4. When I run; it outputs 4,675.55555000000003929017 Where do the extra "3929017" digits come from? Thanks!
  5. Thanks for the reply Jonathon, I'm not familiar with curly brackets yet, but will hopefully get to them soon. As regards to using print with arrays, like the one I referred to above, Larry wrote the following in the book;
  6. I'm asking this question based on the section on p.57, "Receiving Form Data in PHP". When a form uses method="post" why does cause an error, whilst doesn't? Both statements have single quotes inside double quotes. Thanks!
  7. Thanks Larry. What does that actually mean? Is 1 the same as TRUE in this instance?
  8. Page 18 of the book refers to the print function in the PHP manual - http://www.php.net/print. It says: I know how print "something" outputs a string, but I have no understanding as to how print always returns 1. Could someone please explain what is meant by the statement I quoted? Thanks!
  9. Apologies if I gave the wrong impression, my comment was meant as a joke. I know from personal experience that Larry is extremely generous with his books. Thanks everyone!
  10. Thanks very much for your replies Jonathon and Hartley, the detailed info you provided clarifies a lot of the issues for me. I will keep going through the book and the terms should become much more understandable to me as I see them used more often. Jonathon you should ask Larry for a copy of the book in return for the very helpful advice that you give to members here
  11. I've been reading this book and got to Chapter Six and ran into some difficulties. I felt that I had gone through the book too quickly so I've started again and am being much more thorough in both reading and playing around with the code this time round. Being completely new to any form of programming I'm having some difficulty understanding some of the basic concepts in chapter one. For example I don't understand what the following really mean; Statement Executable Compiled language Interpreted language Attributes Function Argument (not sure if that's from Ch 1) Function Lan
  12. Jonathon, thank you very much for that, I'm a Muppet, I had an extra "t" in meta. I'll have to train my brain to spot these errors quicker.
×
×
  • Create New...