PHP 5 switch Statement

1
2
<?php
$favcolor = "red";
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

1 Response

Probably worth noting that for multiple case statements which have the same code executed you can waterfall down into them by stacking
case 'blue':
case 'red and blue':
echo 'It's red and blue and blue';
break;
default:
//// and so on

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.