Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Internshala-Online-Trainings authored Mar 4, 2019
1 parent 052b4ae commit 746eff9
Show file tree
Hide file tree
Showing 80 changed files with 1,162 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Module 4 - PHP/Topic 01 - PHP Introduction/PHP/ReadMe.md
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
echo "Hello! I want to be a web developer.";
?>
8 changes: 8 additions & 0 deletions Module 4 - PHP/Topic 02 - Basics/Basic Syntax/ReadMe.md
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.
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>
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 Module 4 - PHP/Topic 02 - Basics/Basic Syntax/php_in_title.php
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>
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>
8 changes: 8 additions & 0 deletions Module 4 - PHP/Topic 02 - Basics/Concatenation/ReadMe.md
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.
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>
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>
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.
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>
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>
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.
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>
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>
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>
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>
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>
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.
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>
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>
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
$variable1 = 18;
echo 'The value of variable1 is '.$variable1;
?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
$variable1 = 18;
$variable2 = "I am a string.";
?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
$variable1 = 18;
echo 'I am a "string".';
?>
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;
?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

$variable1 = 18;
echo "The value of variable1 is $variable1";
?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

$variable1 = 18;
echo 'The value of variable1 is $variable1 ';
?>
8 changes: 8 additions & 0 deletions Module 4 - PHP/Topic 04 - Loops/For & Foreach/ReadMe.md
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.
6 changes: 6 additions & 0 deletions Module 4 - PHP/Topic 04 - Loops/For & Foreach/for.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

for ($counter = 1; $counter <= 5; $counter++) {
echo $counter . "<br>";
}
?>
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/>";
}
?>
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 . ", ";
}
?>
8 changes: 8 additions & 0 deletions Module 4 - PHP/Topic 04 - Loops/Loops/ReadMe.md
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.
Loading

0 comments on commit 746eff9

Please sign in to comment.