PHP important topics with example


Hypertext Preprocessor(Recursive Acronym)
Server-Side Programming/Scripting Language
It can be embedded directly within HTML. Files use a “.php” file extension.

PHP Case Sensitivity:-

PHP Comments:-

PHP Variables ($):-

PHP echo Statement:-

PHP Strings (” “):-

Strings define as (“DevOpsSchool”)

PHP Numbers:-

PHP Numbers no need to define Strings or Quote define as 123, 234, 345………. etc.

PHP Constants:-

PHP Constants like as identifier which simple value. The value cannot be changed as script. no need to sign $ before the constant name

PHP IF….. Else…..Elseif:-

PHP if…… else…….. elseif used that time you want to perform different actions for different conditions.

PHP switch Statement:-

PHP switch Statement is used to perform different actions based on different switch cases conditions.Switch statement use one conditions many blocks of code to be executed.

Ternary or Conditional Operator:-

Ternary or Conditional Operator used to similar as if else statement.

PHP While Loop:-

While Loop keeps repeating any action until all condition returns false.

Ajay K
Follow me