PHP Tutorial for Beginners full in Urdu/Hindi
FOR Video LECTURER: CLICK_HERE
Tutorial No. 3 (From Practical Working):
$a="Fahad";
$b=" Hussain";
//Indicate concatenation in variable or string...
$c=$a.$b;
echo "Fahad Hussain Free Computer Education 123<br/>";
print "<h1>Fahad Hussain Free Computer Education 123</h1>";
echo $c."<br/>";
print $c."<br/>";
Tutorial No. 4:
//Arithematic Operator in Php (+, -, *, / , %)
$x=12;
$y=22;
$z=$x+$y;
echo $z."<br/>";
echo "The sum of x and y is: ", $x+$y."<br/>";
echo "The sub of x and y is: ", $x-$y."<br/>";
echo "The mul of x and y is: ", $x*$y."<br/>";
echo "The div of x and y is: ", $x / $y."<br/>";
echo "The mod of x and y is: ", $x%$y."<br/>";
//Comparsion Operator (>, < , >=, <=, !=, ==, ===)
$x=12;
$y=122;
$z= ($x==$y);
echo "Compare using ==: ", $z."<br/>";
$za= ($x!=$y);
echo "Compare using ==: ", $za."<br/>";
$zb= ($x>$y);
echo "Compare using ==: ", $zb."<br/>";
$zc= ($x<$y);
echo "Compare using ==: ", $zc."<br/>";
$zd= ($x===$y);
echo "Compare using ==: ", $zd."<br/>";
//working Exmaple
if($x==$y)
{
echo "Compare using if";
}
else
{
echo "Compare using else";
}
//logical Operator (&&, ||, !, and, or, xor)
$x=12;
$y=122;
$z= ($x>=12 && $y<=122);
echo "Compare using ==: ", $z."<br/>";
$za= ($x!=12 && $y<=122);
echo "Compare using ==: ", $za."<br/>";
$zb= ($x!=12 || $y<=122);
echo "OR using ==: ", $zb."<br/>";
$zc= !($y<=122);
echo "Compare using ==: ", $zc."<br/>";
$zd= ($x==12 xor $y<=122);
echo "XOR using ==: ", $zd."<br/>";
//Bitwise Operator in Php (&, |, ^, ~, >>, <<)
$a=4;
$b=3;
echo "And Bitwise Operator Result: ",$a | $b;
echo "<br/>";
echo "And Bitwise Operator Result: ",$a & $b."<br/>";
echo "<br/>";
echo "And Bitwise Operator Result: ",$a ^ $b."<br/>";
echo "<br/>";
echo "And Bitwise Operator Result: ",~$a."<br/>";
echo "<br/>";
echo "And Bitwise Operator Result: ",$a << $b."<br/>";
echo "<br/>";
echo "And Bitwise Operator Result: ",$a >> $b."<br/>";
Tutorial No. 5:
//if Statement (if, if-else, if elseif, if elseif else)
$a=1;
if($a==1)
{
echo "The value of a is: ".$a;
}
else if($a ==10)
{
echo "else if Body : ".$a;
}
else if($a ==2)
{
echo "else if Body : ".$a;
}
else if($a ==3)
{
echo "else if Body : ".$a;
}
else
{
echo "Default";
}
// Nested if-else Statements
$a=1;
$b=2;
$c=3;
if($a==1)
{
echo "The value of a is: <br/>".$a;
if($b==6)
{
echo "The value of b is: <br/>".$b;
if($c==3)
{
echo "The value of c is: <br/>".$c;
}
}
}
Tutorial No. 6:
//Switch Case, including nested Switch Case
$a =1;
$b=10;
switch($a)
{
case 1:
{
echo "print value of a".$a;
switch($b)
{
case 1:
{
echo "Value of b is: ".$b;
break;
}
case 2:
{
echo "Value of b is: ".$b;
break;
}
default:
{
echo "Default: ".$b;
}
}
break;
}
case 2:
{
echo "print value of a".$a;
break;
}
case 3:
{
echo "print value of a".$a;
break;
}
default:
{
echo "Default!".$a;
}
}
Tutorial No. 7:
//for Loop including nested loop
for($a=5;$a>=1;$a--)
{
echo "The Value of a is: ".$a;
echo "<br/>";
for($b=5;$b>=1;$b--)
{
echo "The Value of b is: ".$b;
echo "<br/>";
}
}
// while loop, nested loop
$a=1;
while($a<=10)
{
echo "Value of a is: ".$a; echo "<br/>";
$a++;
$b=1;
while($b<=10)
{
echo "Value of b is: ".$b; echo "<br/>";
$b++;
}
}
// Do-While Loop
$a =100;
do
{
echo "Value of a is: ".$a; echo "<br/>";
$a++;
}while($a<=10);
Tutorial No. 8:
// Jump Statements in php
for($a=1; $a<=10; $a++)
{
if($a==5)
{
exit; //Continue , also use break
}
echo "The value of a is: ".$a;
echo "<br/>;
}
Tutorial No. 9:
// Array 1D and 2D (key value concept)
$arr = array (11,12,13,14,15,16,17,18,19);
for($i=0; $i<=8; $i++)
{
echo $arr[$i];
}
$arr = array(
array(1,2,3,4,5),
array(11,12,13,14,15),
array(21,22,23,24,25)
);
echo $arr[0][0];
$arr = array(11 => 'Fahad', 22 =>'Hussain', 33 => 'php', 44 => 'tutorial');
echo $arr[11];
Tutorial No. 10:
// user define function and built in function in php
function addTwoNumber()
{
echo "The function name by AddTow number<br/>";
$a =1;
$b=2;
$c = $a+$b;
echo $c;
}
addTwoNumber();
function addTwoNumber($a, $b)
{
$c = $a+$b;
echo $c;
}
addTwoNumber(10,20);
echo round(12.10);
echo floor(12.10);
echo ceil(12.10);
echo abs(-10);
echo sqrt(81);
echo strlen("Fahad Hussain");
echo strcmp("Fahad","Fahad");
Tutorial No. 11:
// Gloabal Variable ($Global, $_POST, $_GET)
$x=1;
$y=10;
function add()
{
$GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y'];
}
add();
echo $z;
echo $_SERVER['PHP_SELF'];
echo "<br>";
echo $_SERVER['SERVER_NAME'];
echo "<br>";
echo $_SERVER['HTTP_HOST'];
echo "<br>";
echo $_SERVER['HTTP_REFERER'];
echo "<br>";
echo $_SERVER['HTTP_USER_AGENT'];
echo "<br>";
echo $_SERVER['SCRIPT_NAME'];
<form action="second.php" method="get"> //post
Name: <input type="text" name="nametext" />
Email: <input type="text" name="emailtext" />
<input type="button" />
</form>
///In second page code
<?php
echo $_GET["nametext"];
echo "<br/>";
echo $_GET["nametext"];
?>
Tutorial No. 12:
// Gloabal Variable ( $_FILE)
<form action="File.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="uploading" id="uploading">
<input type="submit" value="Loaded" name="submit">
</form>
Tutorial No. 13 to 19:
Click HERE to Download the related Folder!
Tutorial No. 22 and 23:
PHP Login Page with ReCaptcha Part 1 and Part 2, FREE DOWNLOAD
Click HERE to Download the related Folder!
Tutorial No. 24
PHP Login Page with restrict user more than 3 attempt including database Part 3, FREE DOWNLOAD
Click HERE to Download the related Folder!
Tutorial No. 25
Image upload in php mysql database
Click HERE to Download the related Folder!
Tutorial No. 26
Hide .php or .html extension in url using .htaccess
Click HERE to Download the related Folder!
Tutorial No. 27
Video upload in php mysql
Click HERE to Download the related Folder!
Tutorial No. 28
Generate Barcodes with PHP | Generate Barcode In Php in Hindi/Urdu
Click HERE to Download the related Folder!
Well Come to php tutorial code section, here you can copy lecturer code easily and apply them in your own IDE. In the Series of Code we will code PHP from Scratch using core PHP including PHP'S FRAMEWORKS (laravel), If you have any trouble feel free to write comment!
For videos you can click below link:
Enjoy PHP Tutorials
Tutorial No. 3 (From Practical Working):
$a="Fahad";
$b=" Hussain";
//Indicate concatenation in variable or string...
$c=$a.$b;
echo "Fahad Hussain Free Computer Education 123<br/>";
print "<h1>Fahad Hussain Free Computer Education 123</h1>";
echo $c."<br/>";
print $c."<br/>";
Tutorial No. 4:
//Arithematic Operator in Php (+, -, *, / , %)
$x=12;
$y=22;
$z=$x+$y;
echo $z."<br/>";
echo "The sum of x and y is: ", $x+$y."<br/>";
echo "The sub of x and y is: ", $x-$y."<br/>";
echo "The mul of x and y is: ", $x*$y."<br/>";
echo "The div of x and y is: ", $x / $y."<br/>";
echo "The mod of x and y is: ", $x%$y."<br/>";
//Comparsion Operator (>, < , >=, <=, !=, ==, ===)
$x=12;
$y=122;
$z= ($x==$y);
echo "Compare using ==: ", $z."<br/>";
$za= ($x!=$y);
echo "Compare using ==: ", $za."<br/>";
$zb= ($x>$y);
echo "Compare using ==: ", $zb."<br/>";
$zc= ($x<$y);
echo "Compare using ==: ", $zc."<br/>";
$zd= ($x===$y);
echo "Compare using ==: ", $zd."<br/>";
//working Exmaple
if($x==$y)
{
echo "Compare using if";
}
else
{
echo "Compare using else";
}
//logical Operator (&&, ||, !, and, or, xor)
$x=12;
$y=122;
$z= ($x>=12 && $y<=122);
echo "Compare using ==: ", $z."<br/>";
$za= ($x!=12 && $y<=122);
echo "Compare using ==: ", $za."<br/>";
$zb= ($x!=12 || $y<=122);
echo "OR using ==: ", $zb."<br/>";
$zc= !($y<=122);
echo "Compare using ==: ", $zc."<br/>";
$zd= ($x==12 xor $y<=122);
echo "XOR using ==: ", $zd."<br/>";
//Bitwise Operator in Php (&, |, ^, ~, >>, <<)
$a=4;
$b=3;
echo "And Bitwise Operator Result: ",$a | $b;
echo "<br/>";
echo "And Bitwise Operator Result: ",$a & $b."<br/>";
echo "<br/>";
echo "And Bitwise Operator Result: ",$a ^ $b."<br/>";
echo "<br/>";
echo "And Bitwise Operator Result: ",~$a."<br/>";
echo "<br/>";
echo "And Bitwise Operator Result: ",$a << $b."<br/>";
echo "<br/>";
echo "And Bitwise Operator Result: ",$a >> $b."<br/>";
Tutorial No. 5:
//if Statement (if, if-else, if elseif, if elseif else)
$a=1;
if($a==1)
{
echo "The value of a is: ".$a;
}
else if($a ==10)
{
echo "else if Body : ".$a;
}
else if($a ==2)
{
echo "else if Body : ".$a;
}
else if($a ==3)
{
echo "else if Body : ".$a;
}
else
{
echo "Default";
}
// Nested if-else Statements
$a=1;
$b=2;
$c=3;
if($a==1)
{
echo "The value of a is: <br/>".$a;
if($b==6)
{
echo "The value of b is: <br/>".$b;
if($c==3)
{
echo "The value of c is: <br/>".$c;
}
}
}
Tutorial No. 6:
//Switch Case, including nested Switch Case
$a =1;
$b=10;
switch($a)
{
case 1:
{
echo "print value of a".$a;
switch($b)
{
case 1:
{
echo "Value of b is: ".$b;
break;
}
case 2:
{
echo "Value of b is: ".$b;
break;
}
default:
{
echo "Default: ".$b;
}
}
break;
}
case 2:
{
echo "print value of a".$a;
break;
}
case 3:
{
echo "print value of a".$a;
break;
}
default:
{
echo "Default!".$a;
}
}
Tutorial No. 7:
//for Loop including nested loop
for($a=5;$a>=1;$a--)
{
echo "The Value of a is: ".$a;
echo "<br/>";
for($b=5;$b>=1;$b--)
{
echo "The Value of b is: ".$b;
echo "<br/>";
}
}
// while loop, nested loop
$a=1;
while($a<=10)
{
echo "Value of a is: ".$a; echo "<br/>";
$a++;
$b=1;
while($b<=10)
{
echo "Value of b is: ".$b; echo "<br/>";
$b++;
}
}
// Do-While Loop
$a =100;
do
{
echo "Value of a is: ".$a; echo "<br/>";
$a++;
}while($a<=10);
Tutorial No. 8:
// Jump Statements in php
for($a=1; $a<=10; $a++)
{
if($a==5)
{
exit; //Continue , also use break
}
echo "The value of a is: ".$a;
echo "<br/>;
}
Tutorial No. 9:
// Array 1D and 2D (key value concept)
$arr = array (11,12,13,14,15,16,17,18,19);
for($i=0; $i<=8; $i++)
{
echo $arr[$i];
}
$arr = array(
array(1,2,3,4,5),
array(11,12,13,14,15),
array(21,22,23,24,25)
);
echo $arr[0][0];
$arr = array(11 => 'Fahad', 22 =>'Hussain', 33 => 'php', 44 => 'tutorial');
echo $arr[11];
Tutorial No. 10:
// user define function and built in function in php
function addTwoNumber()
{
echo "The function name by AddTow number<br/>";
$a =1;
$b=2;
$c = $a+$b;
echo $c;
}
addTwoNumber();
function addTwoNumber($a, $b)
{
$c = $a+$b;
echo $c;
}
addTwoNumber(10,20);
echo round(12.10);
echo floor(12.10);
echo ceil(12.10);
echo abs(-10);
echo sqrt(81);
echo strlen("Fahad Hussain");
echo strcmp("Fahad","Fahad");
Tutorial No. 11:
// Gloabal Variable ($Global, $_POST, $_GET)
$x=1;
$y=10;
function add()
{
$GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y'];
}
add();
echo $z;
echo $_SERVER['PHP_SELF'];
echo "<br>";
echo $_SERVER['SERVER_NAME'];
echo "<br>";
echo $_SERVER['HTTP_HOST'];
echo "<br>";
echo $_SERVER['HTTP_REFERER'];
echo "<br>";
echo $_SERVER['HTTP_USER_AGENT'];
echo "<br>";
echo $_SERVER['SCRIPT_NAME'];
<form action="second.php" method="get"> //post
Name: <input type="text" name="nametext" />
Email: <input type="text" name="emailtext" />
<input type="button" />
</form>
///In second page code
<?php
echo $_GET["nametext"];
echo "<br/>";
echo $_GET["nametext"];
?>
Tutorial No. 12:
// Gloabal Variable ( $_FILE)
<form action="File.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="uploading" id="uploading">
<input type="submit" value="Loaded" name="submit">
</form>
Tutorial No. 13 to 19:
Click HERE to Download the related Folder!
Tutorial No. 22 and 23:
PHP Login Page with ReCaptcha Part 1 and Part 2, FREE DOWNLOAD
Click HERE to Download the related Folder!
Tutorial No. 24
PHP Login Page with restrict user more than 3 attempt including database Part 3, FREE DOWNLOAD
Click HERE to Download the related Folder!
Tutorial No. 25
Image upload in php mysql database
Click HERE to Download the related Folder!
Tutorial No. 26
Hide .php or .html extension in url using .htaccess
Click HERE to Download the related Folder!
Tutorial No. 27
Video upload in php mysql
Click HERE to Download the related Folder!
Tutorial No. 28
Generate Barcodes with PHP | Generate Barcode In Php in Hindi/Urdu
Click HERE to Download the related Folder!
No comments:
Post a Comment
Fell free to write your query in comment. Your Comments will be fully encouraged.