<?php
$task204[1]=6.75; $task204[2]=28; $task204[3]=51; $task204[4]=52;
$task205[1]=7; $task205[2]=23; $task205[3]=58; $task205[4]=59;
$task206[1]=9; $task206[2]=27; $task206[3]=53; $task206[4]=56;for ($i=204; $i<=206; $i++) {
$str = "task".$i;
$str = $$str;
for ($j=1; $j<=4; $j++) {
echo $str[$j]."<br>";
}
}
?>
$task204[1]=6.75; $task204[2]=28; $task204[3]=51; $task204[4]=52;
$task205[1]=7; $task205[2]=23; $task205[3]=58; $task205[4]=59;
$task206[1]=9; $task206[2]=27; $task206[3]=53; $task206[4]=56;for ($i=204; $i<=206; $i++) {
$str = "task".$i;
$str = $$str;
for ($j=1; $j<=4; $j++) {
echo $str[$j]."<br>";
}
}
?>
解决方案 »
- google account authentication(google 帐户验证)在php中怎样实现调用呢?
- php文件能否被别人盗取??
- 关于html_entity_decode和createTextNode的问题
- 求个正则表达式
- 关于会员身份验证,是不是只有 session 和cookies 这两种,这两种方法在什么场核,什么情况下该用谁?
- 怎么删除数组中的值呢?
- web页面中图形按钮提交表单请教
- 请问:如何实现在页面关闭时销毁Session
- !!特急,特急,mysql函数加载的问题!!在线等待!!
- 关于访客计数器
- 何我在win2000个人版(sp4)中无法完成mysql的安装?
- 问一个生成的问题与目录有关!
$task204[1]=6.75; $task204[2]=28; $task204[3]=51; $task204[4]=52;
$task205[1]=7; $task205[2]=23; $task205[3]=58; $task205[4]=59;
$task206[1]=9; $task206[2]=27; $task206[3]=53; $task206[4]=56;for($i=204;$i<207;$i++)
{
for($j=1;$j<5;$++)
{
echo '\$task'.$i.$j;
}
}
?>
$task[204][1]=6.75; $task[204][2]=28; $task[204][3]=51; $task[204][4]=52;
$task[205][1]=7; $task[205][2]=23; $task[205][3]=58; $task[205][4]=59;
$task[206][1]=9; $task[206][2]=27; $task[206][3]=53; $task[206][4]=56;foreach($task as $key) {
foreach($key as $value){
echo $value."<br>";
}
}
?>
$str = "task".$i;
$str = $$str;
for ($j=1; $j<=4; $j++) {
$str[$j] = round($str[$j]);
$sql = "select * from test200702 where id like '$i%' order by score3 desc limit $str[$j]";
$query = mysql_query($sql);
$row = mysql_fetch_array($query);//通过查询后,得到的变量如何赋值给 $chinese数组呢?不知道用怎么样的数组比较合适?可以用$chinese[$i][$j]这样的形式吗?我在后面需要这些变量,并对变量进行计算。以下代码,屏幕上没有任何显示。
$chinese[$i][$j] = $row['avg(chinese)'];
echo $chinese[$i][$j];
}
}