Home > Backend Development > PHP Tutorial > PHP implementation code of ninety-nine multiplication table

PHP implementation code of ninety-nine multiplication table

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-25 09:00:14
Original
3467 people have browsed it
Use PHP code to output the multiplication table. Friends in need can refer to it.

Do you still remember the dream you had when you were young? The ninety-nine multiplication tables that we are familiar with are implemented for everyone in this article using PHP code. Learn small examples of PHP operators.

<?php
/**
 * 九九乘法表
 * site bbs.it-home.org
 * date 2013-4-6
*/
    echo "<table width=550px border='1'>";
    //确定行
    for($i=1;$i<=9;$i++){

        echo "<tr>";
        for($j=1;$j<=$i;$j++){
            $res=$i*$j;
            echo "<td>";
                echo "$j"."x"."$i=".$res;
            echo "</td>";
        }
        echo "</tr>";
    }

    echo "</table>";
?>
Copy after login


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