i
PHP Variables
PHP Data Types
PHP Echo & Print
PHP Strings
PHP Numbers
PHP Constants
PHP Operators
PHP if...else...elseif Statements
Switch Statement
PHP Loops
PHP Arrays
Superglobals
PHP Coding Standards
PHP Form Handling
PHP Form Validation
PHP URLs Validation
PHP Form Required Validation
Complete Form Example
PHP File Functions Open/Read
PHP File Create/Write
PHP File Upload
PHP Cookies Handling
PHP Session Handling
PHP filter_var() Function
PHP Validation Filters
PHP Sanitization Filters
Using Filters
Filters Advanced
JSON
PHP Date and Time
MySQL Database
MySQL Connect
MySQL Commands-Creating a Table
MySQL Commands-Inserting The data
MySQL Commands-Prepared Statement
MySQL Commands-Selecting The Data
MySQL Commands-Where and Order By
MySQL Commands-Deleting And Updating The Data
PHP-OOP Introduction
PHP-Classes/Objects
PHP-Constructor/Destructor
PHP-Access Modifiers
PHP-Inheritance
PHP-Inheritance and Protected Access Modifier
PHP-Overriding Inherited Methods
PHP-Final keyword
PHP-Abstract Classes
PHP-Constants
PHP-Traits
PHP-Static Methods and Properties
Introduction to Functions
Defining A function
Returning Values From A Function
Dynamic Function Calls
Variable Scope
Understanding Arguments Or Parameters
Testing For A Function Existence
Returning Multiple Values From A Function
Making practical Use By Building Code Libraries For Code Re-usability
Using Include() And Require()
PHP is a scripting language, and the script can be used anywhere in the document. The PHP script is executed on the server as it is a server scripting language and the HTML result is then sent back to the browser.
>Script Syntax
The php script starts with and anything inside is considered as the php script. The php statements end with a semicolon. The php file includes HTML tags and some code for Php scripting.
The PHP script uses a built-in function "echo" to print the results or any text on the web page. So, for echo, the php script will be as below.
Echo “Learning PHP!”;
?>
It can be combined with an HTML title or body to make the text more presentable.
>Case Sensitivity
PHP is not a case sensitive language. So, the keywords, classes, functions in PHP are not case sensitive. But the variable names in php are case sensitive.
For example, the three echo statements will give the same output as the keywords and statements are not case sensitive.
ECHO "I want to learn PHP!
";
echo "I want to learn PHP!
";
EcHo "I want to learn PHP!
";
?>
But if we have variables in a similar way, the statement with the same case value will only display results.
For example, from the below statements, only the first statement will give the output as variables are case sensitive.
$day = "Monday";
echo “Today is”. $day. "
";
echo “Tomorrow is”. $DAY . "
";
echo “Yesterday was”. $DaY . "
";
?>
Don't miss out!