Date post: | 13-Sep-2015 |
Category: |
Documents |
Upload: | satish-maharajan |
View: | 213 times |
Download: | 0 times |
YMT College of Management
YMT College of Management
Session 4Assignment 1:
Demonstrate the use of Local and Global Variables in PHP.
local_global.php
OUTPUT:
Assignment 2:
Demonstrate the use of Constants in PHP.
OUTPUT: Assignment 3: Demonstrate the use of all operators in PHP.
Arithmatic Operator
OUTPUT:
Array equality Operator:
OUTPUT:
Array union Operator:
OUTPUT:
Assignment Operator
Output:
Comparison Operator
Constant Operator
Output:
Increment and Decrement Operator
Output:
Logical Operator
Output:
String Operator
Output:
Assignment 4:
Demonstrate the use of control structure.Break control structure
break.php
OUTPUT:
Continue control structurecontinue.php
Continue statement
OUTPUT:
dowhile.php
foreach.php
For each
forloop.php
If else statementif2.php
If else statement
OUTPUT:
If else statement with greetingif_else.php
OUTPUT:
If else else if statement with greetingif_elseif.php
If else elseif statement with greeting
Switch caseswitch1.php
OUTPUT
Switch caseSwitch2.php
While loop
while_loop1.php
OUTPUT:
While loop
while_loop2.php
OUTPUT:
Assignment: 05
Write a programme to find factorial of number.
Output
Assignment: 06
Write a program to take a number and check whether it is factorial of any number or not?
factorial Example
Assignment: 08
Write a programme to convert currency or temperature.
Converter
Temperature Converter
Enter Temperature :