Jump to content

HookedOnWeb

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

HookedOnWeb's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yes that helped and the code is now working the way I wanted to, thanks!
  2. I am trying to echo a when a range of number are between a starting and stopping number. For example: When I is >= 12 and <=18 echo I I am having trouble writing the conditional statement. Checking for one number is easy but when I try to check if the number is between two numbers, it cannot get it to work. I am try: $start = 12; $end = 18; for ($i=1; $i >= $start && $today <= $end; $1++) { echo $i . "<br>"; } What I want to happen is to print out are the numbers 12 - 18 down the screen. I am using the FOR loop to test the condition. What I am really trying to do is add a IF condition to the code I have already written, for example: if ($today >= $start && $today <= $end) { echo "The range is between " . $i . "<br>"; } This echo is just there for the example I am actually printing out something else, this way it was easier to read. I know this is basic but I am learning.
  3. Thank you so much that really helped me out.
  4. I have an online calendar demo application that access a database. The demo is open for anyone to use. I want to reset the db each night, thereby deleting what has been entered during the day and restore it back to its original state. The db deals with dates so I also need to create new db entries so a current calendar items are displayed. Does anyone know of a script that might work.
  5. Can someone please help me better understand this line of code? $summary = ($conf['app']['prefixNameOnSummary']) ? "{$rs['fname']} {$rs['lname']}\n " . htmlspecialchars($rs['summary']) : htmlspecialchars($rs['summary']); I understand these are variables: $summary $conf['app']['prefixNameOnSummary'] $rs['fname'] $rs['lname'] $rs['summary'] I understand that \n is a new line. I understand what the "." is doing. I understand what htmlspecialchars is doing to $rs['summary']. What I don't understand is this syntax: $summary = () ? "prints the variables between the quotes" . variable : variable What is the ? and : for and why is the variable before and after the colon? I understand that the '.' joins the part between the quotes to the $variable : $variable Can someone please tell me what this function is called so that I can look it up and understand how it works?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.