Home > Backend Development > PHP Tutorial > Android programmers learn PHP development (14)-whlie exercises-PhpStorm

Android programmers learn PHP development (14)-whlie exercises-PhpStorm

黄舟
Release: 2023-03-06 10:04:01
Original
956 people have browsed it

Please indicate the source for reprinting: http://www.php.cn/
If you find the blog post useful, please like it, comment it, and follow it, thank you! ~


In fact, compared to whlie, I prefer to use for. Here we practice the table form together. Take a look at the GIF dynamic rendering, and take a look at the code:
There is no new knowledge point, so there are no comments in the code. For novice friends who don’t know what to ask, let’s learn php~~


<?php

    $i = 0;
    while (true){
        echo "{$i}<br>";
        $i++;
        if ($i > 10){
            break;
        }
    }

    /** ***********************分割线************************* */
    echo "<table border=&#39;1&#39; align=&#39;center&#39; width=&#39;100&#39;>";
    echo "<caption><h3>iwanghang</h3></caption>";
    $i = 0;
    while ($i < 10){
        echo "<tr><td>{$i}</td></tr>";
        $i++;
    }
    echo "</table>";

    /** ***********************分割线************************* */
    echo "<table border=&#39;1&#39; align=&#39;center&#39; width=&#39;100&#39;>";
    echo "<caption><h3>iwanghang</h3></caption>";
    $i = 0;
    while ($i < 100){
        if ($i % 10 == 0){
            echo "<tr>";
        }
        echo "<td>{$i}</td>";
        $i++;
        if ($i % 10 == 0){
            echo "</tr>";
        }
    }
    echo "</table>";

    /** ***********************分割线************************* */
    $i = 0;
    while ($i < 10){
        echo "#";
        $i++;
    }
    echo "<br>";

    /** ***********************分割线************************* */
    echo "<table border=&#39;1&#39; align=&#39;center&#39; width=&#39;100&#39;>";
    echo "<caption><h3>whlie练习</h3></caption>";
    $i = 0;
    while ($i <10){
        $j = 0;

        if ($i%2==0){
            echo &#39;<tr bgcolor="#999999">&#39;;
        }else{
            echo &#39;<tr>&#39;;
        }

        while ($j < 10){
            echo "<td>$j</td>";
            $j++;
        }

        $i++;
    }
    echo "</table>";
Copy after login


The above is for Android programmers to learn PHP development (14)-whlie exercises-PhpStorm Content, please pay attention to the PHP Chinese website (www.php.cn) for more related content!



Related labels:
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