使用php修改'for ... loop'以省略一个数字 [英] modifying 'for... loop ' with php to leave out one number
问题描述
您好
我使用以下循环填充列表框但我不希望当前选中的值(来自数据库)显示在列表中
我想要omitt的是变量
$ row [''bbannerorgfont'']
我希望一些如何在下面的循环中包括这个效果
从0到6的回声除了$ row [''bbannerorgfont'']
VB有选择... case ...等有没有类似于PHP的东西?
< ;?
for($ i = 0; $ i< 7; $ i ++){
echo"< option value =''"。$ i + 1."''>"。$ i + 1."< / option>< br>" ;;
}
?>
欢呼伊恩
Hello
Im using the following loop to populate a list box but I dont want th
current selected value (from database) to show in the list
The one I want to omitt is in the variable
$row[''bbannerorgfont'']
I wish to some how include this in the below loop to the effect of
echo from 0 to 6 except for $row[''bbannerorgfont'']
VB has select...case... etc. Is there something similar with PHP?
<?
for($i = 0; $i < 7; $i++) {
echo "<option value=''".$i+1."''>".$i+1."</option><br>";
}
?>
cheers ian
推荐答案
row [''bbannerorgfont'']
我希望有些人如何在下面循环到
回显从0到6除了
row[''bbannerorgfont'']
I wish to some how include this in the below loop to the effect of
echo from 0 to 6 except for
row [''bbannerorgfont'']
VB有选择... case ...等有没有与PHP类似的内容?
< ;?
for(
row[''bbannerorgfont'']
VB has select...case... etc. Is there something similar with PHP?
<?
for(
i = 0;
这篇关于使用php修改'for ... loop'以省略一个数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!