Professional Documents
Culture Documents
1. Factorial calculator based on $_REQUEST input and while loop. the factorial of a
number n is simply the product of all the numbers between n and 1. Validate against
negative and zero as input. So, for example, the factorial of 4 is 4 *3 * 2 * 1 = 24.
2. Using superglobal variable $_SERVER, display name of the running server, server
protocol, server software, user agent, current running script, gateway interface, and
remote address.
Modify above concept and print all the super global $_SERVER all information using
loop concept
4. Create an associative array with name and marks for the students and perform
a) Display using functions list of key and values
b) Add new key/value pair in the existing array.
c) Perform each function and display all the elements
d) Use foreach and perform ASORT, ARSORT, KSORT, KRSORT sorting and
display elements