OR test - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of OR test.php
- <?php
- $promo = 'test';
- // combined OR conditions
- if ($promo == '50offmini' || 'fallprevention22') {
- echo 'true';
- } else {
- echo 'false';
- }
- echo '<br>';
- // seperate OR conditions
- if (($promo == '50offmini') || ($promo == 'fallprevention22')) {
- echo 'true';
- } else {
- echo 'false';
- }
- ?>
File Description
- OR test
- PHP Code
- 08 Sep-2022
- 290 Bytes
You can Share it:
Latest PHP Pastes