 |
|
For 1st Sem 2020
1. Create a research report on PHP covering the following topics:
a. PHP Intro
b. PHP Syntax
c. PHP Comments
d. PHP Variables
e. PHP Echo/Print
f. PHP Data Types
g. PHP Strings
h. PHP Numbers
i. PHP Constants
j. PHP Operators
k. PHP Conditional Statements
l. PHP Switch
m. PHP Looping Statements
n. PHP Date and Time Functions
o. PHP String Functions
For the research, follow the following:
1. Report must be printed out with cover page (design the cover page with subject code, title, your name and class).
2. Must be in a plastic folder cover and binder.
3. Must be at least 30 pages’ report.
4. Can contain photos, illustrations, tables, etc.
Work#1: PHP Loop
Using For Loop statement, write a PHP script that will display multiples of 5 from 5-50. Save the file as “Work01-Loop-Yournick.php”
Sample Output:
1 x 5 = 5
1 x 10 = 10
1 x 15 = 15
1 x 20 = 20
1 x 25 = 25
1 x 30 = 30
1 x 35 = 35
1 x 40 = 40
1 x 45 = 45
1 x 50 = 50
Work#2: PHP Date-Time Function
Using Date and Time Functions, write a PHP script that will display the following date and time. Save the file as “Work02-Date-Yournick.php”
Display the current Date in these formats:
1. Today is December 08, 2020
2. Today is Tuesday, 08 Dec 2020
Display the following Dates in the given format:
1. This year’s Christmas falls on Friday.
2. The final exam in PHP was on Friday, 14th February 2020.
3. I was born on 23rd of March 2001 (this should be your actual bdate).
Display the following Time in the given format:
1. The time is 08:15:30AM
2. The time is 12:45pm
Note: Make sure to set the correct Time Zone to display the correct time.
Work#3: PHP String Function
Using String Functions, write a PHP script that will display what is being asked bellow. Save the file as “Work03-String-Yournick.php”
Using the two string variables below, display what is being asked on the given problem. Make sure to display also the two string variables defined below.
$text1 = “this is a special work.”;
$text2 = “THIS IS A SPECIAL WORK.”;
1. Transform the string $text1 to all uppercase letters.
2. Transform the string $text2 to all lowercase letters.
3. Transform the string $text1’s first character of every word to uppercase letter.
4. Transform the string $text2’s first character to lowercase letter.
5. Transform the string $text1’s first character to uppercase letter.
Work#4: PHP Variables
1. Create a PHP file and save it as “PHP_W4_Variables_Yournick.asp”
2. Create the following variables and assigned the corresponding values into it:
a. 5 string variables
b. 5 integer variables
c. 5 float variables
3. Output/Display the following in the browser (example only):
String Variables:
1. String1 = _______________
2. String2 = _______________
3. String3 = _______________
4. String4 = _______________
5. String5 = _______________
Integer Variables:
1. Int1 = __________
2. Int2 = __________
3. Int3 = __________
4. Int4 = __________
5. Int5 = __________
Float Variables:
1. Float1 = __________
2. Float 2 = __________
3. Float 3 = __________
4. Float 4 = __________
5. Float 5 = __________
4. Create an arithmetic operation that will produce the product of the sum of the 5 integer variables and the sum of the 5 floating variables.
Output:
Product of Integer and Float Variables = _________
================================================================
Work#5: PHP Variables & Conditional Statement
1. Create an PHP file and save it as “PHP_W5_If-Then_Yournick.asp”
Parameters:
emp_name = Employee Name
emp_level = Employee Level
pay_amt = Pay Amount
medical = Medical
social_sec = Social Security
ot = Overtime Rendered
emp_level = 1 or 2
if emp_level is 1
pay_amt = 30000
medical = 1500
social_sec = 1500
if emp_level is 2
pay_amt = 40000
medical = 3000
social_sec = 1500
overtime = 150/hr
1. Enter the emp_name and emp_level
2. Enter the number of hours rendered for overtime
3. Computer the total overtime base on rate
4. Compute the total salary by adding pay_amt, medical, social_sec and overtime.
5. Display the following:
Employee Name: ________________
Employee Level: ________________
Overtime Rendered: ________________
Pay Amount: ________________
Medical: ________________
Social Security: ________________
Total Overtime: ________________
Total Pay-Out: ________________
Tag : PHP, MySQL, Laravel Framework, Yii Framework
|
|
 |
 |
 |
 |
Date :
2021-06-08 19:18:47 |
By :
NIRUTB |
View :
557 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |