Answers for "how to use swith case in php"

PHP
1

switch case php

<?php

$fav_food = "burger";

switch($fav_food)
{
    case "pavbhaji":
        echo "My favourite food is pavbhaji";
        break;

    case "dhosa":
        echo "My favourite food is dhosa";
        break;

    case "dabeli":
        echo "My favourite food is dabeli";
        break;
    
    case "burger":
        echo "my favourite food is burger";
        break;

    default:
        echo "I am foody..";
        break;
}
?>
Posted by: Guest on September-06-2021

Browse Popular Code Answers by Language