title: How to change name of array in PHP using a POST result
body: <p>Suppose I have 2 arrays $test24 and $test48 . 
  Now if I receive a web form POST $type value 24 I need to execute this</p>
  
  <pre><code>foreach ($test24 as $val) 
  {
  code here
  }
  </code></pre>
  
  <p>while if I receive a web form POST $type value 48 I need to execute this</p>
  
  <pre><code>foreach ($test48 as $val) 
  {
  code here
  }
  </code></pre>
  
  <p>I am trying to aggregate/merge the code above in a single foreach in this way </p>
  
  <pre><code>foreach ($test$type as $val) 
  {
   code here
  }
  </code></pre>
  
  <p>or this</p>
  
  <pre><code>foreach ($test.$type as $val) 
  {
  code here
  }
  </code></pre>
  
  <p>but none of these two solutions works , do you know a solution ?</p>