Variables 注意:未定义变量:i
欢迎光临 我的智能密码有问题。你能帮我吗?我搜索了以太网,但没有找到相同的示例。下面是错误代码: 注意:第72行的/reklamaje/index.php中未定义的变量:i 问题/错误行-$i=$i+1 我知道我需要一些isset选项。。还是别的什么 更多代码:Variables 注意:未定义变量:i,variables,undefined,Variables,Undefined,欢迎光临 我的智能密码有问题。你能帮我吗?我搜索了以太网,但没有找到相同的示例。下面是错误代码: 注意:第72行的/reklamaje/index.php中未定义的变量:i 问题/错误行-$i=$i+1 我知道我需要一些isset选项。。还是别的什么 更多代码: foreach ($dbo->query($query) as $row) { $m=$i%2; // required for alternate color of rows matching to style class $
foreach ($dbo->query($query) as $row) {
$m=$i%2; // required for alternate color of rows matching to style class
$i=$i+1; // increment for alternate color of rows
echo "<tr>";
echo "<td>".$row['od_firma']."</td>";
echo "<td>".$row['nr_narzedzia']."</td>";
echo "<td>".$row['nr_faktury']."</td>";
echo "<td>".$row['data_przyjecia']."</td>";
echo "<td>".$row['data_wyslania']."</td>";
echo "<td>".$row['opis_rek']."</td>";
echo "<td>".$row['kto_rozpatrzyl']."</td>";
echo "<td><a href=\"index.php?a=dodaj&id={$row['id']}\">Dodaj</a></td>";
echo "<td><a href=\"index.php?a=edit&id={$row['id']}\">Edytuj</a></td>";
echo "<td><a href=\"index.php?a=del&id={$row['id']}\">Usuń</a></td>";
echo "</tr>";
}
echo "</table><br><br>";
////////////////////////////// End of displaying the table with records ////////////////////////
///////////////////////////////
if($nume > $limit ){ // Let us display bottom links if sufficient records are there for paging
/////////////// Start the bottom links with Prev and next link with page numbers /////////////////
echo "<table align = 'center' width='50%'><tr><td align='left' width='30%'>";
//// if our variable $back is equal to 0 or more then only we will display the link to move back ////////
if($back >=0) {
print "<a href='$page_name?start=$back'><font face='Verdana' size='2'>PREV</font></a>";
}
//////////////// Let us display the page links at center. We will not display the current page as a link ///////////
echo "</td><td align=center width='30%'>";
$i=0;
$l=1;
for($i=0;$i < $nume;$i=$i+$limit){
if($i <> $eu){
echo " <a href='$page_name?start=$i'><font face='Verdana' size='2'>$l</font></a> ";
}
else { echo "<font face='Verdana' size='4' color=red>$l</font>";} /// Current page is not displayed as link and given font color red
$l=$l+1;
}
echo "</td><td align='right' width='30%'>";
///////////// If we are not in the last page then Next link will be displayed. Here we check that /////
if($this1 < $nume) {
print "<a href='$page_name?start=$next'><font face='Verdana' size='2'>NEXT</font></a>";}
echo "</td></tr></table>";
// end of if checking sufficient records are there to display bottom navigational link.
}
foreach($dbo->query($query)作为$row){
$m=$i%2;//与样式类匹配的行的替换颜色需要
$i=$i+1;//行的备用颜色增量
回声“;
回显“$row['od_firma']”;
回声“$row['nr_narzedzia'”;
回音“$row['nr_faktury']”;
回显“$row['data_przyjecia']”;
回显“$row['data_wyslania']”;
回音“$row['opis_rek'”;
回显“$row['kto_rozpatrzyl'”;
回声“;
回声“;
回声“;
回声“;
}
回声“
”;
//////////////////////////////显示包含记录的表的结束////////////////////////
///////////////////////////////
如果($nume>$limit){//如果有足够的记录用于分页,那么让我们显示底部链接
///////////////用上一页开始底部链接,用页码开始下一个链接/////////////////
回声“;
////如果变量$back等于0或更大,则只有我们将显示要向后移动的链接////////
如果($back>=0){
打印“”;
}
////////////////让我们在中间显示页面链接。我们不会将当前页面显示为链接///////////
回声“;
$i=0;
$l=1;
对于($i=0;$i<$nume;$i=$i+$limit){
若有($i$eu){
回声“;
}
else{echo“$l”}///当前页面不显示为链接,且字体颜色为红色
$l=$l+1;
}
回声“;
/////////////如果我们不在最后一页,那么将显示下一个链接/////
如果($this1<$nume){
打印“”;}
回声“;
//结束检查是否有足够的记录显示底部导航链接。
}
如何改变它
欢迎所有帮助信息 提示:放置$i=0;上面是foreach($dbo->query($query)as$row)循环。正在工作!!!非常感谢。