I was wondering if I need to use \"break\" in \"switch\" function when \"return\" is used.
function test($string) { switch($string) { case \'test1\':
No its not necessary , because when the key word return is called it will indicate that the particular function which the switch/case was called has come to an end.