Results 1 to 4 of 4

Thread: [RESOLVED] if statements

  1. #1

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Resolved [RESOLVED] if statements

    hi im new to php and was wondering if someone could explain wat an if statement is exactly.
    thanx
    Danny
    Last edited by ninjanutz; Oct 12th, 2005 at 09:20 PM.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: if statements

    An "if" statement evaluates the expression next to it, and based upon whether that condition is true or false, it executes the next set of lines of code.

    for example

    PHP Code:
    if $i {
    //do something
    }
    else{
    //do something else.

    So only if the value of $i is greater than 4, will "do something" occur, else "do something else" will occur.

  3. #3

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: if statements

    thanx mendhak

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: if statements

    Add [Resolved] to the thread title.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width