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