title: Static Algorithm for giving response after user input
body: <p>I have 2 arrays: <code>F of length 4 and S of length 25</code><br>
  User can select any no of these elements from the above two arrays <br>For eg selecting any 2 from F and 10 from S.Based on what user selected i have give a response to the user from my another <code>array R of length 100</code>.
  I tried making if else but was exhausted after creating 
  100s of them.
  So is there any better approach for this ? </p>
  
  <p>My goal is to give user one of the index from array R.</p>
  
  <p>PS. There is no AI(Artificial Intelligence) involved.</p>
  
  <p>EDIT
  Currently what i have done is :</p>
  
  <pre><code>if(in_array(1,$F) &amp;&amp; in_array(12,$S)){
     return $R[3];
  }else if(in_array(1,$F) &amp;&amp; in_array(17,$s)){
     return $R[91];
  }else if(in_array(2,$F) &amp;&amp; in_array(1,$F) &amp;&amp; in_array(21,$S) &amp;&amp;  in_array(25,$S)){
     return $R[23];
  }else if(in_array(3,$F) &amp;&amp; in_array(21,$S) &amp;&amp; in_array(7,$S)){
     return $R[17];
  }..........
  </code></pre>