Answers for "how to use the case statement in php"

PHP
2

case statement in php

<?php
switch ($i) {
    case "apple":
        echo "i is apple";
        break;
    case "bar":
        echo "i is bar";
        break;
    case "cake":
        echo "i is cake";
        break;
}
?>
Posted by: Guest on October-19-2020

Code answers related to "how to use the case statement in php"

Browse Popular Code Answers by Language