2015年8月30日 — Possible to compare strings in PHP using a switch statement? · Put var_dump($lang);var_dump($lang=='de'); after both $v = 'Berne'; and check ...
2015年11月7日 — You can do it using the switch statement like this: $field = 'bla bla_term bla'; switch (true) case $field === 'action': echo 'action'; ...
The switch statement is similar to a series of IF statements on the same expression. In many occasions, you may want to compare the same variable (or expression) ...