【发布时间】:2023-04-08 12:07:01
【问题描述】:
对你们来说可能是一个简单的问题。在谷歌上找不到。
我正在尝试连接两个变量名称;
$i=0;
for ($i=0;$i<5;$i++){
if($array[$i]>0){
$test.$i=//do something
}else{
$test.$i=//do something
}
}
//echo $test0 gives me nothing.
//echo $test1 gives me nothing.
我知道我不能使用 $test.$i 但不知道该怎么做。有帮助吗?谢谢!
【问题讨论】:
标签: php variables concatenation