Welcome Guest, Not a member yet? Register   Sign In
if statments
#1

[eluser]Todlerone[/eluser]
Hello all and TGIF if it applies.
Hopefully a simple question/answer. I have not needed this up till now but can't seem to get it to work. I'm triing to make a dynamic if condition like this...

Code:
if ($unit == "Both"){$this_search = "($tp['treat_unit'] == \"Cyberknife\") || ($tp['treat_unit'] == \"Trilogy\")";}
if ($unit == "Cyberknife"){$this_search = "$tp['treat_unit'] == \"Cyberknife\"";}
if ($unit == "Trilogy"){$this_search = "$tp['treat_unit'] == \"Trilogy\"";}

if ($this_search){
//...code here
}

TY for any help/suggestions...




Theme © iAndrew 2016 - Forum software by © MyBB