I have a series of if codes that need to be put together but the code acts weird and chooses the last if code.
if($boardid='1'){ $altboard='13' and $title='Archives' ;}
elseif($boardid='2'){ $altboard='14' and $title='Archives' ;}
so this code turns out to work, but it cant be repeated to finish the rest of the codes
the code that doesn't work is:
if($boardid=='1'){ $altboard='13' and $title='Archives' ;}
if($boardid='2'){ $altboard='14' and $title='Archives' ;}
if($boardid='3'){ $altboard='15' and $title='Archives' ;}
if($boardid='6'){ $altboard='16' and $title='Archives' ;}
if($boardid='7'){ $altboard='17' and $title='Archives' ;}
and there is more if codes to add, but i didn't add them, as it only uses whatever turns out to be the last of the lines regardless of boards, even though it clearly recognizes the boards. so what gives and how do i make a series of if codes work together? I have another file with the exact same thing and it reacts the same. If then elseif for the rest of the code doesn't work and neither does alternating if and else if.
putting two equal signs Works fine with The above mentioned code but not with the second mentioned code which is this
if($wrong=='0'){$prize='1000';}
if($wrong=='1'){$prize='700';}
if($wrong=='2'){$prize='500';}
if($wrong=='4'){$prize='200';}
if($wrong=='5'){$prize='100';}
Unlike the last one where it keeps only the last code this one takes only the first one. so the prize always turns out to be 1000. any help here