Basic PHP Syntax ?

PHP content can be set in anyplace in the record. Beginning a PHP script with:

Basic PHP Syntax ?

// PHP code goes here
?>

".php" is the PHP file extension by default.

HTML tags and some PHP scripting code are typically contained in a PHP file.

An example of a straightforward PHP file with a PHP script that outputs the phrase "Hello World!" via the built-in PHP function "echo" can be found below. on a website page:

<!DOCTYPE html>
<html>
<body>

<h1>My first PHP page</h1>

echo "Hello World!";
?>


</body>
</html>

PHP Case Sensitivity

In PHP, keywords (for example if, else, while, reverberation, and so on.), Case is not a factor in classes, functions, or user-defined functions.

In the example provided below, each of the three echo statements is legal and equal:

<!DOCTYPE html>
<html>
<body>

ECHO "Hello World!
"
;
echo "Hello World!
"
;
Echo "Hello World!
"
;
?>


</body>
</html>