SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    <, = , > question ?

    Hey
    I don't understand how these things work
    if i want to check a var if it's biigger or equal to anumber or biiger then x and smaller the y ?
    Can somone help me pelase ?
    I was thinking of this:
    if ($catid > 99 || $catid < 106)
    Any sense ?
    Thnaks!

  2. #2
    SitePoint Wizard silver trophy Jelena's Avatar
    Join Date
    Feb 2005
    Location
    Universum, 3rd Corner
    Posts
    3,000
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    //greater than 99 and less than 106
    if($cat 99 && $cat 106
    PHP Code:
    //greater or the same
    if($cat >= 99) {
    }
    //smaller or the same
    if($cat <= 106) {

    -- Jelena --

  3. #3
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh ok thanks, and for the sql ?
    Would this work ? (the id>99 and id<106 part)
    Thanks!

  4. #4
    SitePoint Wizard silver trophy Jelena's Avatar
    Join Date
    Feb 2005
    Location
    Universum, 3rd Corner
    Posts
    3,000
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yes it should work.
    -- Jelena --

  5. #5
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok thanks!


Bookmarks

Posting Permissions

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