There is for example the code:
$a = 3; $b = 1; $op = "-"; switch ($op) { case '+': echo $a + $b ; case '-': echo $a - $b ; case '*': echo $a * $b ; case '/': echo $a / $b; case '%': echo $a % $b; break; } I tried different options - with quotes, without, </br> , /n... I can not understand how to make a line break after each echo in case ?
echo ($a + $b).'</br>' ;but nevertheless Ipatyev is right: why this hemorrhage, if you can put a transfer after the switch - Alexey Shimansky/n? Maybe you are looking for"\n"? --- must be in double quotes if\nin single quotes will not work. - Arnial 1:01if($b === 0) echo "Это число 0". In general, read abouttry catch. You can also writecase '/': if($b !== 0) echo $a / $b; else echo "Деление на 0";case '/': if($b !== 0) echo $a / $b; else echo "Деление на 0";- MaximPro