(** Full Stack Masters Certification Training: https://www.edureka.co/masters-program/full-stack-developer-training **)
This Edureka PPT will give you a complete understanding of PHP which is one of the most widely used scripting language for the backend logic. This tutorial covers the following topics:
What is PHP?
What can you do with PHP?
Fundamental Syntax of PHP
PHP variables
PHP constants
Primitive data types
Reference data types - Arrays and functions
Conditional Statements (Loops)
Hands-on: Collecting form data using PHP
Check out our complete Youtube playlist here: https://goo.gl/gMFLx3
Follow us to never miss an update in the future.
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
PHP Programming Tutorial For Beginners | PHP Tutorial For Web Development | PHP Training | Edureka
1. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
2. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
Agenda
What is PHP? Why learn PHP? PHP Fundamentals
3. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
Let’s Cover Basics First!
4. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
What is PHP?
PHP is a server side scripting language, and a powerful tool for making dynamic
and interactive Web pages
Hypertext Pre-processor Used for server side logic
5. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
What can PHP do?
Dynamic
Pages
Collect Form Data
Data
Encryption
• Easy to Learn
• Supports different types of DB
• Cross Platform
• Supports multiple server types
PHP Features
Create Read Update Delete
6. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
PHP Fundamentals
7. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
Variables
Memory location
Variable name
Variable is a name given to a memory location which acts as a container for storing data.
Syntax:
1 $age = 22;
8. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
Constants
Constants are fixed values that do not change during execution time.
Syntax:
define ('PI', 3.1415926);
Examples of constants
9. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
Primitive Data Types
Strings Boolean
TRUE
FALSE
Integers
Float Undefined
1.8456
Hello World
10. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
Reference Data Types - Arrays
0 1 2 3 4
An array is a data structure that contains a list of elements. These elements are all of the
same data type, such as an integer or string.
Syntax:
1
2
$chocolates = array(‘Eclairs', 'Mars', 'KitKat');
11. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
Reference Data Types - Functions
A function is a block of organized, reusable code that is used to perform a single, related action.
Functions
Predefined
Functions
User Defined
Functions
Syntax:
1
2
3
function addNumbers($num1, $num2){
return $num1 + $num2;
name of the function enter parameters here
12. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
Conditional Statements
Conditional statement is a set of rules performed if a certain condition is met. It is like an
‘If-Then’ statement. (IF a condition is met, THEN an action is performed)
If Statement
If code
End
Start
True
Condition
False
Exit
Syntax:
1
2
3
if(condition) {
statement;
}
13. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
Conditional Statements
Conditional statement is a set of rules performed if a certain condition is met. It is like an
‘If-Then’ statement. (IF a condition is met, THEN an action is performed)
Else If Statement
If code
End
Start
True
Condition
False
Else if code
Syntax:
1
2
3
4
5
6
if(condition) {
statement a;
}
else (condition) {
statement b;
}
14. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
Loops
Loops are used to repeat a specific block until some end condition is met.
Loops
do whilewhilefor
Start
Conditional Code
Condition
False
True
End loop
15. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
While Loop
While the condition is true, the code within the loop is executed.
Start
Conditional Code
End
True
False
Condition
While loop
Syntax:
1
2
3
while(condition) {
loop code;
}
16. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
Do While Loop
This loop will first execute the code, then check the condition and while
the condition holds true, execute repeatedly.
Start
Conditional Code
End
True
False
Condition
Do while loop
Syntax:
1
2
3
4
do {
loop code;
}
while(condition);
17. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
For Loop
Repeatedly executes the loop code while a given condition is TRUE. It
tests the condition before executing the loop body.
For loop
Start
Execute Statement (s)
End
Next item from
sequence
If no more itemsItem from
sequenceSyntax:
1
2
3
for(begin; condition; step) {
loop code;
}
18. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
Switch Case
The switch statement is used to perform
different actions based on different
conditions.
Syntax:
1
2
3
4
5
6
7
8
9
10
switch(expression) {
case 1 :
code block 1
break;
case 2 :
code block 2
break;
default :
code block 3
}
Start
Switch expression
End
Case 1
Case 2
Default
Code block 1
break;
Code block 2
break;
Default statement
False
False
19. PHP & MySQL Training https://www.edureka.co/php-mysql-self-paced
WebDriver vs. IDE vs. RC
➢ Data Warehouse is like a relational database designed for analytical needs.
➢ It functions on the basis of OLAP (Online Analytical Processing).
➢ It is a central location where consolidated data from multiple locations (databases) are stored.