Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: strstr

  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    97
    Thanks
    2
    Thanked 0 Times in 0 Posts

    strstr

    Hello, does this code mean if the variable $query contains "cb_session" or if the variable $admin_area is true do that ?
    I say because in the code there is not variable $admin_area so it could be deleted the or condition...
    Thanks

    PHP Code:
    if(stristr($query"cb_sessions") || $admin_area )
                
    $data $this->Execute($query);
            else    
                
    $data $this->CacheExecute($query); 

  • #2
    New Coder
    Join Date
    May 2012
    Location
    Maui, HI
    Posts
    31
    Thanks
    0
    Thanked 7 Times in 7 Posts
    It means "If cb_sessions is found in $query or $admin_area equals true".
    Keep in mind that if $admin_area is set anywhere, and it's set to something other than 0, false, null, or an empty string ("") it will evaluate as true.


  •  

    Posting Permissions

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