$today=date("m-d",time());
$jieri="03-8";
if($today==$jieri)
{
$totalMoney = $basicMoney + 300;
}else if($today!=$jieri){
$totalMoney = $basicMoney + 0;
}
echo $totalMoney;
?>
$jieri="03-8";
if($today==$jieri)
{
$totalMoney = $basicMoney + 300;
}else if($today!=$jieri){
$totalMoney = $basicMoney + 0;
}
echo $totalMoney;
?>
2018-04-16
$line=ceil($no/$maxLine);
$row=($no%$maxLine==0)?$maxLine:$no%$maxLine;
$row=($no%$maxLine==0)?$maxLine:$no%$maxLine;
2018-04-16
大家可以试试把$key 输出,看看有break和没有break有什么区别,在这里break确实是跳出foreach的循环,代码如下。
foreach($students as $key=>$v)
{
//使用条件结构,判断是否为该学号
echo $key;
echo "<br \>";
if($key==$query)
{
echo $v;//输出(打印)姓名
break;
}
}
?>
foreach($students as $key=>$v)
{
//使用条件结构,判断是否为该学号
echo $key;
echo "<br \>";
if($key==$query)
{
echo $v;//输出(打印)姓名
break;
}
}
?>
2018-04-14