Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. get_students($id, $name = null, $email = null)
  2.  
  3. function get_students($id, $name = null, $email) {
  4. if (!empty($id)) {
  5. // Get students by their ids
  6. } else if (!empty($name) && !empty($email)) {
  7. // Get students by their names and emails
  8. }
  9. }
  10.  
  11. get_students(1); //Will retrieve studen with id 1
  12. 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