Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > มาทดสอบเขียนโปรแกรม PHP กันครับ ภาษาอังกฤษทางโปรแกรมค่อนข้างตายตัว



 

มาทดสอบเขียนโปรแกรม PHP กันครับ ภาษาอังกฤษทางโปรแกรมค่อนข้างตายตัว

 



Topic : 136179



โพสกระทู้ ( 41 )
บทความ ( 0 )



สถานะออฟไลน์




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







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2021-06-08 19:18:47 By : NIRUTB View : 430 Reply : 4
 

 

No. 1



โพสกระทู้ ( 296 )
บทความ ( 0 )



สถานะออฟไลน์


Work01-Loop (PHP)
for ($i = 5; $i <= 50; print "1 x $i = $i<br>", $i+=5);


No special case for the others.






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2021-06-08 23:22:42 By : TheGreatGod_of_Death
 


 

No. 2



โพสกระทู้ ( 41 )
บทความ ( 0 )



สถานะออฟไลน์


ตอบความคิดเห็นที่ : 1 เขียนโดย : TheGreatGod_of_Death เมื่อวันที่ 2021-06-08 23:22:42
รายละเอียดของการตอบ ::
ผมไม่เข้าใจตัว Work#5: PHP Variables & Conditional Statement ครับ ตกลงเขาให้เขียน php หรือ .net

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2021-06-08 23:29:56 By : NIRUTB
 

 

No. 3



โพสกระทู้ ( 296 )
บทความ ( 0 )



สถานะออฟไลน์


Quote:
Work#5: PHP Variables & Conditional Statement

1. Create an PHP file and save it as “PHP_W5_If-Then_Yournick.asp

พิมพ์ผิด

Quote:
3. Computer the total overtime base on rate

พิมพ์เกิน
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2021-06-08 23:43:44 By : TheGreatGod_of_Death
 


 

No. 4



โพสกระทู้ ( 296 )
บทความ ( 0 )



สถานะออฟไลน์


ถ้าอยากเล่นแบบ Console App (เหมือน Desktop App) ใช้ PHP CLI
https://www.php.net/manual/en/features.commandline.php



https://stackoverflow.com/questions/22277633/how-to-take-user-input-like-prompt-but-in-php/22277654
https://stackoverflow.com/questions/5794030/interactive-shell-using-php
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2021-06-08 23:46:55 By : TheGreatGod_of_Death
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : มาทดสอบเขียนโปรแกรม PHP กันครับ ภาษาอังกฤษทางโปรแกรมค่อนข้างตายตัว
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 05
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่