Sometimes we want to compare the same variable with different values, and that’s where the PHP switch statement comes in. In the following example, we compare the variable $i with the values 0, 1, 2. switch ($i) { case 0: echo “i es 0”; break; case 1: echo “i es 1”; break; case 2: echo … Continue reading PHP switch statement
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed