0 votes
147 views
in other by (98.9k points)
edited
PHP learning notes for beginners

1 Answer

0 votes
by (98.9k points)
selected by
 
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".

 

by (98.9k points)
edited

In PHP, keywords (e.g. ifelsewhileecho, etc.), classes, functions, and user-defined functions are not case-sensitive.

by (98.9k points)
edited

 

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:

Related questions

0 votes
1 answer 80 views
asked Apr 9, 2022 in PHP by Doubtly (98.9k points)
0 votes
1 answer 159 views
0 votes
1 answer 114 views
+1 vote
1 answer 167 views
asked Feb 17, 2022 in other by anonymous
0 votes
1 answer 189 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

537 users

...