Blogger Information
Blog 29
fans 0
comment 0
visits 29304
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
php乘法表
咸鱼梦
Original
1089 people have browsed it

QQ截图20171227171936.png

代码如下:

echo <<< 'INPUT'
<form>
请输入行:<input type="text" name="row"><button>提交</button>
</form>
INPUT;

//isset()存在且值不为null,返回:true
$number = isset($_GET['row']) ? $_GET['row'] : null;

for ($i=1;$i<=$number;$i++) { //$i=1是初始值,$i<=$number 是判断条件是否成立,成立之后每次循环$i自增1;
	for ($j=1;$j<=$i;$j++) {  //$i=1是初始值,$i<=$number 是判断条件是否成立,成立之后每次循环$i自增1;
		echo "$j*$i=".$j*$i.'&nbsp;';
	}
	echo '<br>';
}


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post