Blogger Information
Blog 6
fans 0
comment 0
visits 5393
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP Switch语句
PHP
Original
734 people have browsed it

Switch语句用于根据不同条件执行不同的动作

实例

<?php
$text="red";
switch ($text){
    case "red";
      each "你喜欢红色";
      break;

    case "green";
      each "你喜欢绿色";
      break;
    case "black";
      each "你喜欢黑色";
      break;

    case "yellow";
      each "你喜欢黄色";
      break;
    default;
      each "你喜欢的不是红,绿,黑、或黄色"

}
?>




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