########################################## # # PHP (1): In class exercise # ########################################## #################################################### # ALL OF THE FILES SHOULD BE SAVED AS .php # Try to add enough comments in your code. #################################################### ###### Question No. 1 ################################################## #################################################### # # Try to show the following table by PHP. # # ---------------- # | Name | Age | # |--------------- # | Peter | 35 | # |--------------- # | Mark | 22 | # ---------------- # # Tip: This table has 3 rows (TR) and 2 columns (TD) # # You can combine PHP in HTML or combine # HTML in PHP. # #################################################### Please visit: q1.php Please visit: q1.txt ###### Question No. 2 ################################################## #################################################### # # Try to show the following table by PHP when # a is 'Peter', b is 'Marc', c is 35 and d is 22. # # ---------------- # | Name | Age | # |--------------- # | Peter | 35 | # |--------------- # | Mark | 22 | # ---------------- # # You can combine PHP in HTML or combine # HTML in PHP. # #################################################### Please visit: q2.php Please visit: q2.txt ###### Question No. 3 ################################################## #################################################### # # x is 25 and y is 30. Calculate and # show all of the arithmitics on them # including +,-,*,/ and %. # # Please show the results in a nice format # #################################################### Please visit: q3.php Please visit: q3.txt ###### Question No. 4 ################################################## #################################################### # # x has the following elements: # 'Peter', 'Mike', 'Brian' and 'Robin' # # Please show the elements in the following format: # # Element1: Peter # Element2: Mike # Element3: Brian # Element4: Robin # #################################################### Please visit: q4.php Please visit: q4.txt ###### Question No. 5 ################################################## #################################################### # # Create a drop down menu using the elements of the # last question ('Peter', 'Mike', 'Brian', 'Robin') # #################################################### Please visit: q5.php Please visit: q5.txt ###### Question No. 6 ################################################## #################################################### # # Put the following code in a php file and see the # the results. What is this? # # phpinfo(); # #################################################### Please visit: q6.php Please visit: q6.txt