<div dir="ltr">Joel,<div><br></div><div>   Forgot second half of initial if</div><div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px">if(!($var(is_a_present) == $null && $var(is_b_present) <b>== $null)</b>){<div>
# a and b exist</div><div>} else if(!($var(is_a_present) == $null){</div><div># a exists</div><div>} else if(!($var(is_b_present) == $null)){</div><div># b exists</div><div>} else {</div><div> # failover</div><div>}</div>
<div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 16, 2014 at 1:37 PM, Brandon Armstead <span dir="ltr"><<a href="mailto:brandon@cryy.com" target="_blank">brandon@cryy.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Joel,<div><br></div><div>You are looking for something like this logically:</div><div><br></div><div>if(!($var(is_a_present) == $null && $var(is_b_present))){<div>
# a and b exist</div><div>} else if(!($var(is_a_present) == $null){</div>
<div># a exists</div><div>} else if(!($var(is_b_present) == $null)){</div><div># b exists</div><div>} else {</div><div> # <span>failover</span></div><div>}</div></div><div><br></div><div>
Sincerely,</div><div>Brandon <span>Armstead</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Wed, Jul 16, 2014 at 5:46 AM, Joel White <span dir="ltr"><<a href="mailto:joelewhite@gmail.com" target="_blank">joelewhite@gmail.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div><div><div><div><div>I was wondering how many levels deep in conditional _if_  _else_  statements can go.  I need to create a statement that has 4 possible outcomes and need to know if this is possible.<br>


<br></div>I have two variables<br><br></div>I want one thing to happen if only the first variable is present<br><br></div>Another if only the second variable is present<br><br></div>Yet another if they are both present<br>


<br></div>And a fail over if None of the variables are present<br><br><br><br></div>I do see that is can be done with 3 conditions using   _if_  _if else_ _else_<br><br></div>how can I accomplish 4 conditional statements?<br>


<br><br></div>Thank you in advance<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">Joel<br></font></span></div>
<br></div></div>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>