⊗ppPmCdBT 83 of 447 menu

If-Else Construct and Boolean Values

Let we have some boolean variable, which can take values true or false:

<?php $test = true; ?>

Let's write an if that checks our variable for the value true:

<?php $test = true; if ($test === true) { echo '+++'; } else { echo '---'; } ?>

Check that the variable $test is equal to true.

Check that the variable $test is equal to false.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline