php training institute in ambala ! battra computer centre

39
Ph. No.: 8222066670, 4000670 Email: [email protected] om Website: www.batracomputercentre.com BATRA COMPUTER CENTRE ISO CERTIFIED 9001:2008

Upload: jatin-batra

Post on 11-Apr-2017

6 views

Category:

Education


1 download

TRANSCRIPT

Page 1: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

BATRA COMPUTER CENTREISO CERTIFIED 9001:2008

Page 2: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 3: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

PHP is a computer scripting language Originally designed for producing dynamic web pages Appeared in 1995 PHP Group is responsible for the language, no formal

specification Free Software Runs on Most Operating System and platforms URL: http://www.php.net

Page 4: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 5: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

PHP has quite easy syntax, if you are familiar with any c-type language

It has all the same structure that you are familiar with other programming languages

PHP is designed to output to browser, but it is possible to do also CLI apps.

Page 6: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Variables in PHP are represented by a dollar sign PHP supports eight types: -- Boolean, integer, float, double, array, object, resource and null

Page 7: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Case-sensitivity Start witg letter or_ After that you can have numbers, letters and_

Page 8: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

You cannot alter the value of constant after declaration. --define (constant, “value”) ; --print CONSTANT ;

Page 9: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

PHP has lot of predefined variables Also predefined constant: - ____LIN E___ - ____FILE____ - ____FUNCTION___ - ____CLASS____ - ___METHOD___ See. http://.php.net/manual/en/language.constants.predefined.php

Page 10: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

<?pp

$a = “Pekka”;

Print “My name is “ . $a;

/>

Page 11: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

<? Php$a = “Pekka”;Function Test () { print $a ;}Print “My Name iis “ ;Test () ;?>

Page 12: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

<? Php$a = “Pekka”;Function Test () { global $a: print $a ;}Print “My Name iis “ ;Test () ;?>

Page 13: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

If, else, elseif, switch While, do-while, for Foreach Break, continue

Page 14: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 15: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Single quoted: ‘this is a $ variable’ Double quoted: ‘this is a $variable” Heredoc:

-- $str = <<<EOD -- $ Example of string -- spanning multiple lines -- using heredoc syntax. -- EOD;

Page 16: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

$mj = “moi” ; Print $mj [0]; $mj [0] = ‘x’ ; Print $mj; $mj = $mj . “hei” ; Print $mj; $mj .= “ Terse”; Print $mj;

Page 17: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

A lot of functions… - http://www.php.net/manual/en/ref.strings.php

Page 18: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Every Statement ends with ;

-- $a = 5 ; -- $a = function () ; -- $a = ( $b = 5) ; -- $a++; ++$a; -- $ a += 3 ;

Page 19: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Arithmetic: +,-,*,% Setting variable: = Bit: &, |, ^, ~, <<, >> Comparison: ==, ===, !=, !==, <, > <=, >=

Page 20: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 21: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 22: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 23: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 24: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 25: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 26: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 27: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 28: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 29: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 30: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 31: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 32: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 33: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 34: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 35: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 36: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 37: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

Page 38: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com

ADDRESS:

SCO -15, Dayal Bagh,

Near Hanuman Mandir

Ambala Cantt-13300, Haryana

Ph. No.: 9729666670, 8222066670 &0171-4000670

Email ID: [email protected]

Website: www.batracomputercentre.com

Page 39: PHP Training Institute in Ambala ! Battra Computer Centre

Ph. No.: 8222066670, 4000670

Email: [email protected]

Website: www.batracomputercentre.com