Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- get_students($id, $name = null, $email = null)
- function get_students($id, $name = null, $email) {
- if (!empty($id)) {
- // Get students by their ids
- } else if (!empty($name) && !empty($email)) {
- // Get students by their names and emails
- }
- }
- get_students(1); //Will retrieve studen with id 1
- get_students(null, "Name", "email@email.com"); //Will retrieve students with name "Name" and email "email@email.com"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement