我在表单中有多个 PHP 变量
$number1, $number2, $number3 and so on...
我想在循环中动态引用这些以从中检索信息,但不确定如何动态引用静态变量。前任:
for($i = 1; $i <= 10; $i++) {
//The first number to be printed should be the value from
//$number1 not $number concatenated to $i
//here are some of the strings I tried:
echo "$number$i";
echo "{$number}$i";
echo "{$number}{$i}";
}