What You Can Do with PHP
There are lot more things you can do with PHP.
You can generate pages and files dynamically.
You can create, open, read, write and close files on the server.
You can collect data from a web form such as user information, email, phone no, etc.
You can send emails to the users of your website.
You can send and receive cookies to track the visitor of your website.
You can store, delete, and modify information in your database.
You can restrict unauthorized access to your website.
You can encrypt data for safe transmission over internet.
Default Syntax
This is a test string
The Amount is : 200
The Amount is :
The Amount is :
The Name of student is : David Rayy
His Class is : V and Roll No. is 12
How to make single line comment.
How to make multiline comments
Area of the rectangle is : 14
The value of x is :
The value of y is : 20
The value of x is : 10
The value of y is :
40
Salary of Mr. A is : 1000$
Salary of Mr. B is : 1200$
Salary of Mr. C is : 1400$
| Salary of Mr. A is | 1000$ |
| Salary of Mr. B is | 1200$ |
| Salary of Mr. C is | 1400$ |
Salary statement for the Current month
- Salary of Mr. A is :
1000$
- Salary of Mr. B is :
1200$
- Salary of Mr. C is :
1400$
25
Server variables
/MD2_PHP/php-pamati.php
216.73.216.4
/MD2_PHP/php-pamati.php
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
rsmikov.lv
Thank you for visiting - https://www.das.lv/PHP Arithmetic Operators
14
6
40
2.5
2
PHP Assignment Operators
10
50
30
125
5
10
PHP Comparison Operators
bool(true)
bool(false)
bool(true)
bool(true)
bool(true)
bool(false)
bool(true)
bool(false)
PHP Incrementing and Decrementing Operators
11
11
10
11
9
9
10
9PHP Logical Operators
2014 is not a leap year.
PHP String Operators
Hello World!
Hello World!
PHP Array Operators
array(6) {
["a"]=>
string(3) "Red"
["b"]=>
string(5) "Green"
["c"]=>
string(4) "Blue"
["u"]=>
string(6) "Yellow"
["v"]=>
string(6) "Orange"
["w"]=>
string(4) "Pink"
}
bool(false)
bool(false)
bool(true)
bool(true)
bool(true)
PHP Conditional Statements
Have a nice day!
Have a nice day!PHP If…Else Vs Switch…Case
Today is Saturday. Its movie time.PHP Arrays
Peter Parker's Email-id is: peterparker@mail.comarray(3) {
[0]=>
string(6) "London"
[1]=>
string(5) "Paris"
[2]=>
string(8) "New York"
}
Fruits are : Apple and Banana
Fruits are : Apple and Banana
PHP Functions For Sorting Arrays
Array
(
[0] => Blue
[1] => Green
[2] => Red
[3] => Yellow
)
Array
(
[0] => 1
[1] => 2
[2] => 2.5
[3] => 4
[4] => 7
[5] => 10
)
Array
(
[Harry] => 14
[Peter] => 20
[Clark] => 35
[John] => 45
)
Array
(
[Clark] => 35
[Harry] => 14
[John] => 45
[Peter] => 20
)
Different Types of Loops in PHP
PHP while Loop
The number is 2
The number is 3
The number is 4
PHP do…while Loop
The number is 2
The number is 3
The number is 4
PHP for Loop
The number is 1
The number is 2
The number is 3
PHP foreach Loop
Red
Green
Blue
name : Peter Parker
email : peterparker@mail.com
age : 18
PHP Built-in Functions
PHP User-Defined Functions