Showing posts with label My Journey in PHP at Innobuzz. Show all posts
Showing posts with label My Journey in PHP at Innobuzz. Show all posts

Monday, December 15, 2008

Day 3: For Loop, While Loop, And Array for both dimension

Today i am learning the basic structure of loop like for loop and while and do loop

I also learn Switch command

the coding in class is

/*



$a=5;

if($a==5)
{
print "The value of \$a is 5
";
}

else
{
print "The value of \$a is not 5
";
}


($a==6)? print "The value of \$a is 5
" : print "The value of \$a is not 5
";


$a=6;
switch ($a)
{
case 1: print "The value of \$a is 1";
break;

case 2: print "The value of \$a is 2";
break;

case 3: print "The value of \$a is 3";
break;

case 4: print "The value of \$a is 4";
break;

case 5: print "The value of \$a is 5";
break;

default: print "The value of \$a is not in the cases";
break;
}

print "
";
print "
";
print "
";
print "
";
print "
";
print "
";
print "
";

//Loops

print "For Loop:
";
for($i=1; $i<=10; $i++)
{
print "$i
";
}

print "While Loop:
";
$i=1;
while($i<=10)
{
print "$i
";
$i++;
}


print "Do While Loop:
";
$i=1;
do
{
print "$i
";
$i++;
}while($i<=10);


print "Nested Loops:
";


for($i=1; $i<=10; $i++)
{

print "The value of \$i is $i
";

for($j=1; $j<=10; $j++)
{
print "\$j = $j
";
}

}

print "Array:
";


$c= array('a', 'b', 'c', 'd', 'e');

print "$c[3]
";
print "$c[1]
";

$d= array('Hello', 'My', 'Name', 'Is', 'Praful');

print "$d[2]
";


foreach($d as $val)
{

print "$val
";

}

print count($d)."
";


$e= array(name=> 'Innobuzz', course=> 'CPP', time=>'10 - 12');

print "$e[name]
";


foreach($e as $k=> $v)
{

print "$k = $v
";

}


/*Define an array $arr

1: Print the number of elements in arr
2: Print the elements in arr with the positions.

*/










?>
*/

Sunday, December 14, 2008

Day 2: PHP

IN Day two i have studied at Innobuzz
Concept of Pre and Post increment and decrement
Concept of for Loop and while loop
Genrate dynamic Table IN HTML
Concept of IF and Else
?> GENRATING DYNAMIC TABLE IN PHP WITH THE HELP OF HTML
";
for($a=1; $a<=10; $a++){print ""; for($b=1;$b<=10;$b++) { print ""; print $a * $b; print ""; }print ""; }print "";
?>

";
for($a=1; $a<=10; $a++){print ""; for($b=1;$b<=10;$b++) { $c = $a * $b; if($c%3 == 0 OR $c%2 == 0) { print ""; } else { print ""; } print $c; print ""; }print ""; }print "";
?>
GENRATING TABLE IN HTML









Name Class
Me PHP

Thursday, December 4, 2008

Day One

Hi! to all
today i am starting learning the PHP/My SQL at INNOBUZZ at pitampura Delhi. The Course Name is CPP which stands for Certified PHP programer. Today 4th of dec. is my first calss at Innobuzz centre. Today I am learning basic knowldge about PHP , Appache, and My sql. and some starting coding in PHP is also learnt by me.so what is happing in class i am displayed here


PHP

Web Server

It is the computer which hosts the websites.

It works on port number 80.

Softwares for the web server:

IIS
Apache

XAMPP: X any operating system.
A Apache
M MY Sql
P PHP
P Perl

WAMPP
LAMPP

Web Languages:

These are languages which the interpereted by the Web Browser.


Server Side Language
Client Side Language


HTML is a client side language.

PHP, ASP are Server Side Language.

PHP: PHP Hypertext Preprocessor

This is a recursive acronym.

Requirements:

PC
XAMPP
Text Editor: Notepad or Win32pad.

Installation of XAMPP

Double click on the XAMPP package and select the drive on which you want to install the XAMPP.


You will a folder named XAMPP at the location C:/XAMPP

There is folder named HTDOCS in C:/XAMPP in which we will place all our webpages.

PHP:

Free and Open Source
Secure
Takes less time to develop resource.

MY SQL

Structure Query Language.

It used to manage database.

Database is a collection of tables and records.


PHP Coding


$a=5;
$b=4;

print "$a
";
print "$b
";

$h="Hello World !";
print "$h
";

$c=$a+$b;

print "This is "."CPP
";

print "The sum of \$a and \$b is $c
";

print $a++;
print ++$a;
?>