Php Interview Question and Answers

29. Which function would you use to merge two arrays?
  You can merge arrays with the array_merge() function.
 
Your Name Your Email-ID
Your Answer
30. Which function would you use to open a file for reading or writing?
  The fopen() function opens a file. It accepts the path to a file and a character representing the mode. It returns a file resource.
 
Your Name Your Email-ID
Your Answer
31. Which function contains the current session’s ID?
  You can access the session's ID with the session_id() function.
 
Your Name Your Email-ID
Your Answer
32. How would you get a current line number while an XML document is being parsed?
  The xml_get_current_line_number() function returns the current line number.
 
Your Name Your Email-ID
Your Answer
12345678910 Page 8 of 10