How can I put a variable with operation in the declaration of a drop down box?
I have a drop down box with the months and when user selects March, the result of the code below is 2+1. I get this is handled as string function but I don’t know how to make php handle it as it would result in 3.
echo "<option value=\"$i+1\">$month[$i]</option>\n";
You can break the operation out of quotes for it to evaluate as expected: