Jump to content

switch-case Q


vijdev

Recommended Posts

can i do something like this?

 

<?php
switch ($i) {
    case 0:
        echo "i equals 0";?>
////////////// html stuff ////////
<?php
        break;
    case 1:
        echo "i equals 1"; ?>
///////////////////html stuff//////////////
<?php
        break;
    case 2:
        echo "i equals 2"; ?>
////////////html stuff///////////////
<?php
        break;
}
?>

Link to comment
https://forums.phpfreaks.com/topic/213808-switch-case-q/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.