Posts

Showing posts with the label PHP Syntax

PHP Syntax

B asic PHP syntax, including case sensitivity, statements, and whitespaces. As a programming language, PHP has a set of rules that governs how you write programs. Start PHP  <?php Enclosing tag ?> Example <!DOCTYPE html > < html lang = "en" > < head > < meta charset = "UTF-8" > < title > PHP Syntax </ title > </ head > < body > < h1 > <?php echo 'PHP Syntax' ; ?> </ h1 > </ body > </ html >   PHP code, the enclosing tag is optional <?php echo 'PHP Syntax' ; PHP is partially case-sensitive. Knowing what is case sensitive and what is not is crucial to avoid syntax errors. If you have a function such as, you can use it as  COUNT . It would work properly. The following are case-insensitive in PHP: PHP constructs are if, if-else, if-else, switch, while, do-while, etc. Keywords such as  true  and  false . ...