PHP output multiplication table code example_PHP tutorial

WBOY
Release: 2016-07-13 09:59:51
Original
1825 people have browsed it

An example of PHP outputting multiplication table code

This article mainly introduces an example of PHP outputting multiplication table code. This article directly gives the implementation code. Friends who need it can refer to it. Next

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

九九乘法表

 

 

for ($i=1; $i<=9; $i )

{

echo("

");

for ($j=1; $j<=$i; $j )

{

echo("

");

}

echo("

");

}

?>

九九乘法表

if ($i == $j)

{

echo(" style="color: #FF0"");

}

echo(">");

$s = $i * $j;

echo "$i * $j = $s";

echo("

 

1 2 3 4

56 7 8 9 10 11
12
13
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
Multiplication table <🎜>for ($i=1; $i<=9; $i )<🎜> <🎜>{<🎜> <🎜>echo(""); for ($j=1; $j<=$i; $j )<🎜> <🎜>{<🎜> <🎜>echo(""); } echo(""); } ?>

Multiplication table

<🎜>if ($i == $j)<🎜> <🎜>{<🎜> <🎜>echo(" style="color: #FF0"");<🎜> <🎜>}<🎜> <🎜>echo(">"); $s = $i * $j; echo "$i * $j = $s"; echo("
http://www.bkjia.com/PHPjc/975126.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/975126.htmlTechArticlePHP output multiplication table code example. This article mainly introduces PHP output multiplication table code example. This article Give the implementation code directly. Friends who need it can refer to it? 1 2 3 4 5 6 7 8...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!