forked from Internshala-Online-Trainings/Web-Development
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
052b4ae
commit 746eff9
Showing
80 changed files
with
1,162 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Steps to open the folder in netbeans: | ||
1. Open netbeans. | ||
2. Click on file in the top menu. | ||
3. Choose New Project option. | ||
4. Choose PHP category and in Projects section, choose PHP Application with Existing Source. | ||
5. For Site Root, browse to the folder where you have extracted these files. | ||
6. Click on finish. | ||
7. The folder will open in netbeans. |
3 changes: 3 additions & 0 deletions
3
Module 4 - PHP/Topic 01 - PHP Introduction/PHP/php_introduction.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
echo "Hello! I want to be a web developer."; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Steps to open the folder in netbeans: | ||
1. Open netbeans. | ||
2. Click on file in the top menu. | ||
3. Choose New Project option. | ||
4. Choose PHP category and in Projects section, choose PHP Application with Existing Source. | ||
5. For Site Root, browse to the folder where you have extracted these files. | ||
6. Click on finish. | ||
7. The folder will open in netbeans. |
12 changes: 12 additions & 0 deletions
12
Module 4 - PHP/Topic 02 - Basics/Basic Syntax/html_in_echo_statement.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>PHP Syntax</title> | ||
</head> | ||
<body> | ||
<?php | ||
// This is a single line comment | ||
echo "<h1>I am the Batman!</h1>"; | ||
?> | ||
</body> | ||
</html> |
14 changes: 14 additions & 0 deletions
14
Module 4 - PHP/Topic 02 - Basics/Basic Syntax/multiple_line_comment.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>PHP Syntax</title> | ||
</head> | ||
<body> | ||
<?php | ||
// This is a single line comment | ||
echo "I am the Batman!"; | ||
/* This is a multi line comment | ||
I.e. it is used to write comments in two or more lines */ | ||
?> | ||
</body> | ||
</html> |
12 changes: 12 additions & 0 deletions
12
Module 4 - PHP/Topic 02 - Basics/Basic Syntax/php_in_title.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title><?php echo "Batman"; ?></title> | ||
</head> | ||
<body> | ||
<?php | ||
// This is a single line comment | ||
echo "<h1>I am the Batman!</h1>"; | ||
?> | ||
</body> | ||
</html> |
12 changes: 12 additions & 0 deletions
12
Module 4 - PHP/Topic 02 - Basics/Basic Syntax/single_line_comment.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>PHP Syntax</title> | ||
</head> | ||
<body> | ||
<?php | ||
//This is a single line comment | ||
echo"I am the Batman!"; | ||
?> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Steps to open the folder in netbeans: | ||
1. Open netbeans. | ||
2. Click on file in the top menu. | ||
3. Choose New Project option. | ||
4. Choose PHP category and in Projects section, choose PHP Application with Existing Source. | ||
5. For Site Root, browse to the folder where you have extracted these files. | ||
6. Click on finish. | ||
7. The folder will open in netbeans. |
13 changes: 13 additions & 0 deletions
13
Module 4 - PHP/Topic 02 - Basics/Concatenation/concatenation_of_different_datatypes.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Variables, Data types and Operators</title> | ||
</head> | ||
<body> | ||
<?php | ||
$var1 = 18; | ||
$var2 = 12; | ||
echo "The value of first variable is " . $var1 . " and the value of second variable is " . $var2; | ||
?> | ||
</body> | ||
</html> |
13 changes: 13 additions & 0 deletions
13
Module 4 - PHP/Topic 02 - Basics/Concatenation/concatention_of_strings.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Variables, Data types and Operators</title> | ||
</head> | ||
<body> | ||
<?php | ||
$var1 = "Hello"; | ||
$var2 = "Internshala"; | ||
echo $var1 . $var2; | ||
?> | ||
</body> | ||
</html> |
8 changes: 8 additions & 0 deletions
8
Module 4 - PHP/Topic 02 - Basics/Variables, Datatypes, and Operators/ReadMe.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Steps to open the folder in netbeans: | ||
1. Open netbeans. | ||
2. Click on file in the top menu. | ||
3. Choose New Project option. | ||
4. Choose PHP category and in Projects section, choose PHP Application with Existing Source. | ||
5. For Site Root, browse to the folder where you have extracted these files. | ||
6. Click on finish. | ||
7. The folder will open in netbeans. |
14 changes: 14 additions & 0 deletions
14
Module 4 - PHP/Topic 02 - Basics/Variables, Datatypes, and Operators/addition.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Variables, Data types and Operators</title> | ||
</head> | ||
<body> | ||
<?php | ||
$var1 = 18; | ||
$var2 = 12; | ||
$sum = $var1 + $var2; | ||
Echo $sum; | ||
?> | ||
</body> | ||
</html> |
13 changes: 13 additions & 0 deletions
13
Module 4 - PHP/Topic 02 - Basics/Variables, Datatypes, and Operators/gettype.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Variables, Data types and Operators</title> | ||
</head> | ||
<body> | ||
<?php | ||
$var1 = 18; | ||
$var2 = 12; | ||
echo gettype($var1); | ||
?> | ||
</body> | ||
</html> |
8 changes: 8 additions & 0 deletions
8
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Arrays/ReadMe.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Steps to open the folder in netbeans: | ||
1. Open netbeans. | ||
2. Click on file in the top menu. | ||
3. Choose New Project option. | ||
4. Choose PHP category and in Projects section, choose PHP Application with Existing Source. | ||
5. For Site Root, browse to the folder where you have extracted these files. | ||
6. Click on finish. | ||
7. The folder will open in netbeans. |
13 changes: 13 additions & 0 deletions
13
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Arrays/associative_array.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Arrays</title> | ||
</head> | ||
<body> | ||
<?php | ||
$numbers = array("first_number" => 18, "second_number" => 12); | ||
$sum = $numbers["first_number"] + $numbers["second_number"]; | ||
echo "Sum of two variables is " . $sum . "."; | ||
?> | ||
</body> | ||
</html> |
13 changes: 13 additions & 0 deletions
13
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Arrays/indexed_array.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Arrays</title> | ||
</head> | ||
<body> | ||
<?php | ||
$numbers = array(18, 12); | ||
$sum = $numbers[0] + $numbers[1]; | ||
echo "Sum of two variables is " . $sum . "."; | ||
?> | ||
</body> | ||
</html> |
12 changes: 12 additions & 0 deletions
12
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Arrays/print_r.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Arrays</title> | ||
</head> | ||
<body> | ||
<?php | ||
$numbers = array("first_number" => 18, "second_number" => 12); | ||
print_r($numbers); | ||
?> | ||
</body> | ||
</html> |
14 changes: 14 additions & 0 deletions
14
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Arrays/sizeof.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Arrays</title> | ||
</head> | ||
<body> | ||
<?php | ||
$numbers = array(18, 12); | ||
$sum = $numbers[0] + $numbers[1]; | ||
echo "Sum of two variables is " . $sum . "."; | ||
echo "Length of the array is " . sizeof($numbers); | ||
?> | ||
</body> | ||
</html> |
13 changes: 13 additions & 0 deletions
13
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Arrays/two_dimensional_array.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Arrays</title> | ||
</head> | ||
<body> | ||
<?php | ||
$numbers = array(array(18, 12), array(1, 2)); | ||
$sum = $numbers[0][0] + $numbers[0][1]; | ||
echo "Sum of two variables is " . $sum . "."; | ||
?> | ||
</body> | ||
</html> |
8 changes: 8 additions & 0 deletions
8
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Functions/ReadMe.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Steps to open the folder in netbeans: | ||
1. Open netbeans. | ||
2. Click on file in the top menu. | ||
3. Choose New Project option. | ||
4. Choose PHP category and in Projects section, choose PHP Application with Existing Source. | ||
5. For Site Root, browse to the folder where you have extracted these files. | ||
6. Click on finish. | ||
7. The folder will open in netbeans. |
21 changes: 21 additions & 0 deletions
21
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Functions/sum_function.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
function sum($parameter1, $parameter2) { | ||
$addition = $parameter1 + $parameter2; | ||
return $addition; | ||
} | ||
?> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Functions</title> | ||
</head> | ||
<body> | ||
<?php | ||
$var1 = 18; | ||
$var2 = 12; | ||
$sum = sum($var1, $var2); | ||
echo "Sum of two variables is " . $sum . "."; | ||
?> | ||
</body> | ||
</html> |
21 changes: 21 additions & 0 deletions
21
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Functions/sum_function_with_echo.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
function sum($parameter1, $parameter2 = 0) { | ||
$addition = $parameter1 + $parameter2; | ||
echo "Sum of two variables is " . $addition . "."; | ||
return; | ||
} | ||
?> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Functions</title> | ||
</head> | ||
<body> | ||
<?php | ||
$var1 = 18; | ||
$var2 = 12; | ||
sum($var1, $var2); | ||
?> | ||
</body> | ||
</html> |
8 changes: 8 additions & 0 deletions
8
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Strings/ReadMe.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Steps to open the folder in netbeans: | ||
1. Open netbeans. | ||
2. Click on file in the top menu. | ||
3. Choose New Project option. | ||
4. Choose PHP category and in Projects section, choose PHP Application with Existing Source. | ||
5. For Site Root, browse to the folder where you have extracted these files. | ||
6. Click on finish. | ||
7. The folder will open in netbeans. |
4 changes: 4 additions & 0 deletions
4
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Strings/concatenation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
$variable1 = 18; | ||
echo 'The value of variable1 is '.$variable1; | ||
?> |
4 changes: 4 additions & 0 deletions
4
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Strings/declare_string_variable.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
$variable1 = 18; | ||
$variable2 = "I am a string."; | ||
?> |
4 changes: 4 additions & 0 deletions
4
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Strings/echo_double_quotes.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
$variable1 = 18; | ||
echo 'I am a "string".'; | ||
?> |
6 changes: 6 additions & 0 deletions
6
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Strings/strlen.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
$string1 = "I am first string"; | ||
$length_of_string = strlen($string1); | ||
echo $length_of_string; | ||
?> |
5 changes: 5 additions & 0 deletions
5
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Strings/variable_inside_double_quotes.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
$variable1 = 18; | ||
echo "The value of variable1 is $variable1"; | ||
?> |
5 changes: 5 additions & 0 deletions
5
Module 4 - PHP/Topic 03 - Functions_Arrays_Strings/Strings/variable_inside_single_quotes.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
$variable1 = 18; | ||
echo 'The value of variable1 is $variable1 '; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Steps to open the folder in netbeans: | ||
1. Open netbeans. | ||
2. Click on file in the top menu. | ||
3. Choose New Project option. | ||
4. Choose PHP category and in Projects section, choose PHP Application with Existing Source. | ||
5. For Site Root, browse to the folder where you have extracted these files. | ||
6. Click on finish. | ||
7. The folder will open in netbeans. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
for ($counter = 1; $counter <= 5; $counter++) { | ||
echo $counter . "<br>"; | ||
} | ||
?> |
7 changes: 7 additions & 0 deletions
7
Module 4 - PHP/Topic 04 - Loops/For & Foreach/foreach-assosiative-array.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
$marks = array("first_number" => 4, "second_number" => 8); | ||
foreach ($marks as $mark_index => $mark_value) { | ||
echo "The index is $mark_index, the value is $mark_value <br/>"; | ||
} | ||
?> |
7 changes: 7 additions & 0 deletions
7
Module 4 - PHP/Topic 04 - Loops/For & Foreach/foreach-indexed-array.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
$marks = array(4, 8, 15, 16, 23, 42); | ||
foreach ($marks as $mark) { | ||
echo $mark . ", "; | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Steps to open the folder in netbeans: | ||
1. Open netbeans. | ||
2. Click on file in the top menu. | ||
3. Choose New Project option. | ||
4. Choose PHP category and in Projects section, choose PHP Application with Existing Source. | ||
5. For Site Root, browse to the folder where you have extracted these files. | ||
6. Click on finish. | ||
7. The folder will open in netbeans. |
Oops, something went wrong.