to add to an array or combine arrays.
$option = array();
$option += $option1;
$option += $option2;
$option += $option3;
Your code should read
$option = array();
if (isset($option1))
{
$option1 = OP_ONE;
$option1_SLCT = OP_ONE;
$option += $option1;
}
if (isset($option2))
{
$option2 = OP_TWO;
$option2_SLCT = OP_TWO;
$option += $option2;
}
if (isset($option3))
{
$option3 = OP_THREE;
$option3_SLCT = OP_THREE;
$option += $option3;
}
Quote:
|
Now in the above, this will set the array only to the last one select. In this case option3 is the only value in the array.
|
This is because you are not adding to the array rather creating a new $option array containing $option3.
HTH