skip to Main Content

Have 4 lines of if / elseif statements:

if ($resart = 's_resrenew' AND $row['tld'] == '.de'){$msetupfee_sres =  '1.97';}
 elseif ($resart = 'ek_resrenew' AND $row['tld'] == '.de'){$msetupfee_sres =  '1.67';}
 elseif ($resart = 's_resrenew'){$msetupfee_sres = $row['msetupfee']*0.82;}
 elseif ($resart = 'ek_resrenew'){$msetupfee_sres = $row['msetupfee']*0.8;}

I do not understand why only one option is displayed. So it doesn’t matter if "$resart" is "s_resrenew or ek_resrenew". In every case the table displays "1.97" and "82%".
"1.67" and "80%" are completely ignored. (the second an the fourth statement)

Tried wit "endif" a.s.o., but nothing helped…

2

Answers


  1. Chosen as BEST ANSWER

    Thanks,- sure, - it's PHP. I already tried double and triple equals == and ===, but nothing changes.


  2. Have you tried with double (or triple) equals operators ? Most of your conditions are using = and not == so they might be like "sure I can do $resart = 's_resrenew' if you want"

    But what confused me here is that you say your table displays the first and the third results. Isn’t it supposed to just display the if condition result, and never the second elseif result ?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search