Skip to content
doubtly

1 answer

Best answer

Basic PHP Syntax

A PHP script can be placed anywhere in the document.

A PHP script starts with <?php and ends with ?>:

<?php
// PHP code goes here
?>

The default file extension for PHP files is ".php".

Doubtly · 28 Dec 2021 Report
Was this answer helpful?
  • In PHP, keywords (e.g. if, else, while, echo, etc.), classes, functions, and user-defined functions are not case-sensitive. – Doubtly ·
  • Note: However; all variable names are case-sensitive! Look at the example below; only the first statement will display the value of the $color variable! This is because $color, $COLOR, and $coLOR are treated as three different variables: – Doubtly ·
Sign in to comment

Your answer

Log in or create a free account to answer this question.