php初学

来源:互联网 发布:帝国时代2mac版英文版 编辑:程序博客网 时间:2024/05/18 03:20
<!DOCTYPE html><html>  <head>    <link type='text/css' rel='stylesheet' href='style.css'/>    <title>PHP!</title>  </head>  <body>    <img src="http://i1061.photobucket.com/albums/t480/ericqweinstein/php-logo_zps408c82d7.png"/>    <div class="header"><h1>      <?php      $welcome = "Let's get started with PHP!";      echo $welcome;      ?>    </h1></div>    <p><strong>Generate a list:</strong>      <?php      for ($number = 1; $number <= 10; $number++) {        if ($number <= 9) {            echo $number . ", ";        } else {            echo $number . "!";        }      }; ?>    </p>    <p><strong>Things you can do:</strong>      <?php        $things = array("Talk to databases",        "Send cookies", "Evaluate form data",        "Build dynamic webpages");        foreach ($things as $thing) {            echo "<li>$thing</li>";        }                unset($thing);      ?>    </p>    <p><strong>This jumbled sentence will change every time you click Submit!<strong></p>    <p>      <?php        $words = array("the ", "quick ", "brown ", "fox ",        "jumped ", "over ", "the ", "lazy ", "dog ");        shuffle($words);        foreach ($words as $word) {            echo $word;        };                unset($word);      ?>    </p>  </body></html>



Let's get started with PHP!

Generate a list: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10!

Things you can do:

  • Talk to databases

    This jumbled sentence will change every time you click Submit!

    fox the quick jumped lazy brown over dog the

  • Send cookies
  • Evaluate form data
  • Build dynamic webpages



  • 0 0
    原创粉丝点击