I have the following code:
<?php
echo check('three');
function check($string) {
switch($string) {
case 'one' || 'two' : return 'one or two'; break;
case 'three' || 'four' : return 'three or four'; break;
}
}
Currently it outputs:
one or two
But obviously I want the code to return three or four
.
So what is right method to return the same code for multiple case statements?