Chrome Extension

Switch case in PHP

<?php
    $type = "2";
    switch($type) {
        case "1":
            echo "case 1";
            break;
        case "2":
            echo "case 2";
            break;
        default:
            break;
    }
?>
We are a bunch of lazy programmers so we developed this chrome extension
search code from your favorite search engine
Install Now
Output
case 2

The switch can be used to perform different actions and execute code blocks based on different conditions. 

Was this helpful?
0 Comments
Open Code Manager We are hiring