Need PHP help

Discussion in 'PHP' started by SA101, Jul 6, 2009.

  1. #1
    I have the following code:

    			
    
                            if($Values['A] == '1') {
    				$Apt->A = TRUE;
    			}
    			if($Values['B'] == '1') {
    				$Apt->B = TRUE;
    			}
    			if($Values['Laundry'] == '1') {
    				$Apt->C = TRUE;
    			}
    PHP:
    I want it so that if A and B are selected (if both are 1), then C can be True or False.
     
    SA101, Jul 6, 2009 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't know what you mean by "then C can be True or False"

    but
    
    if ($Values['A'] == 1 && $Values['B'] == 1){
    //Then both A and B are selected so do what you want here
    }
    
    PHP:
     
    wd_2k6, Jul 6, 2009 IP
  3. Ignite

    Ignite Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yup its great lolz.. it seems you meesed up
     
    Ignite, Jul 7, 2009 IP