I was wondering if I need to use \"break\" in \"switch\" function when \"return\" is used.
function test($string) { switch($string) { case \'test1\':
No, you don't need a break in a switch case statement. The break is actually optional, but use with caution.
break
switch case