表2在php中使用for循环 [英] Table 2 in php using for loop

查看:78
本文介绍了表2在php中使用for循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在php中打印表格,当我点击按钮然后2表格打印

我试过这个但是它显示我在第6行上的未定义错误



我的尝试:



 <   html  >  
< head >
< / head >
< body >
< 按钮 名称 = 提交 & gt; print < / button > ;
<? php define(' NUM',3);
for($ i = 1; $ i< = 10; $ i ++){
echo $ i * num;
echo ' < br>'< /跨度>;
}
?>
< / body >
< / html > < / br >

解决方案

< blockquote> i = 1;


i< = 10;


i ++){
回声

I try to print table in php when I click on button then 2 table print
I tried this but it shows me undefine error on line 6

What I have tried:

<html>
<head>
</head>
<body>
<button name="submit">print</button>
<?php define ('NUM' ,3);
for($i=1;$i<=10;$i++){
	echo $i*num;
	echo '<br>';
}
?>
</body>
</html></br>

解决方案

i=1;


i<=10;


i++){ echo


这篇关于表2在php中使用for循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆