Category: PHP

PHP programs with Various types of examples

Q: 2) Consider the following entities and their relationships
Doctor (doc_no, doc_name, address, city, area)
Hospital (hosp_no, hosp_name, hosp_city)
Doctor and Hospital are related with many-many relationship. Create a RDB in 3 NF
for the above and solve following
Using above database, write a PHP script which accepts hospital name and print
information about doctors visiting / working in that hospital in tabular format.

Consider the following entities and their relationships Internet Programming 1 / Assignment 5 / Set A HTML The above code saves as seta2.html PHP The above code saves as seta2.php

Q: 1) Consider the following entities and their relationships
Emp (emp_no,emp_name,address,phone,salary)
Dept (dept_no,dept_name,location)
Emp-Dept are related with one-many relationship Create a RDB in 3NF for the
above and solve following
Using above database write a PHP script which will print a salary statement in the
format given below, for a given department. (Accept department name from the
user).
Deparment Name : _____
Maximum Salary          Minimum Salary         Sum Salary

Consider the following entities and their relationships Internet Programming 1 / Assignment 5 / Set A HTML The above code saves as seta1.html PHP The above code saves as seta1.php

Q: 2) Write a menu driven program to perform the following operations on associative arrays:
a) Sort the array by values (changing the keys) in ascending, descending order.
b) Also sort the array by values without changing the keys.
c) Filter the odd elements from an array.
d) Sort the different arrays at a glance using single function.
e) Merge the given arrays.
f) Find the intersection of two arrays.
g) Find the union of two arrays.
h) Find set difference of two arrays.

Write a menu driven program to perform the following operations on associative arrays: Internet Programming 1 / Assignment 2 / Set C HTML The above code saves as setc2.html PHP…

Q: 1) Write a menu driven program to perform the following stack and queue related operations:[Hint: use Array_push(), Array_pop(), Array_shift(), Array_unshift() ]
a) Insert an element in stack
b) Delete an element from stack
c) Display the contents of stack
d) Insert an element in queue
e) Delete an element from queue
f) Display the contents of queue

write a menu driven program to perform the following stack and queue related operations: Internet Programming 1 / Assignment 2 / Set C HTML The above code saves as setc1.html…