Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by AlexBeau

  1. Ok so I am going through the Review and Pursue questions at the end of chapter 9 and one of them is quite confusing to me. The question is: Can someone help me clarify what is meant by writing the CSS codes for the customize.php script. The last sentence in the question is confusing to me. Any help is appreciated. Thank you, Alex
  2. Was doing the last section of chapter 7 where you take array data from a HTML and print it back out on the screen. The script is event.php. Larry mentioned that in the real world you would use validation to make sure that a event name has been entered into the form. I gave it a shot and this is what I have come up with: <?php // Filename: event.php // Author: Alex Beauchamp // Date: 7/23/11 // This script creates an array from an html form's group of checkboxes // Error Management ini_set('display_errors', 1); error_reporting(E_ALL | E_STRICT); /
  3. Ok thank you. I guess I was getting caught up on the fact that you can assign a value to a variable within the if statement. Also after speaking to a few other people I learned that the variable assignment occurs before the expression is evaluated. Now that I know that I would say that because the variable $var is first assigned the value donut and then is evaluated it is TRUE. This is because it is not an empty string, and empty value or a value of 0. Am I correct in my thinking? I just want to make sure I fully understand everything before I get in to deep to not know what I am
  4. Still diligently working my way through this book and I have come to a roadblock at the end of chapter 6. The question I am having trouble with states: Without knowing anything about $var will the following conditional be TRUE or FALSE? Why? if ($var = 'donut') { I am apt to say that it will be false because we don't know if $var has been assigned the value donut yet within the program but I am not sure. If someone could answer this for me and give me an explanation so I can fully grasp this concept I would be thankful. Thank you, Alex
  5. Good evening, This book is my first foray into programming and I have a question regarding one of the tips in chapter 2. "Unlike some other languages, PHP generally doesn’t require you to declare or initialize a variable prior to use. In other words, you can refer to variables without first defining them. But it’s best not to do that; I try to write my scripts so that every variable is defined or validated before use." What do you mean by declare or initialize the variable before use? Any help with this would be greatly appreciated. Alex
  • Create New...