1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

difference

Discussion in 'PHP' started by davenet, Jul 18, 2007.

  1. #1
    What's the difference between:

    $nim==$row[0];

    and

    $nim=$row[0];

    what does each code do?
     
    davenet, Jul 18, 2007 IP
  2. mrmonster

    mrmonster Active Member

    Messages:
    374
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #2
    == is a comparison
    = is assignment
     
    mrmonster, Jul 18, 2007 IP
  3. DavidAusman

    DavidAusman Well-Known Member

    Messages:
    399
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    108
    #3
    == && = are operators

    $nim == $row[0] means that variable $nim must exactly the same as $row[0]

    $nim = $row[0] means you assign the value of $row[0] to $nim
     
    DavidAusman, Jul 18, 2007 IP