Php Interview Question and Answers
13. |
Which function would you use to insert a record into a database? |
|
The dba_insert() function adds a record to a database. |
|
|
14. |
Which function would you use to read the name of a directory item after you have opened a directory for reading? |
|
The readdir() function returns the name of a directory item from an opened directory. |
|
|
15. |
How can you tell when you have reached the end of a file? |
|
The feof() function returns true when the file resource it is passed has reached the end of the file. |
|
|
16. |
Which predefined variable could you use to find out about the browser that called your script? |
|
Browser type and version, as well as the user's operating system, are usually stored in an element called 'HTTP_USER_AGENT' in the $_SERVER array. |
|
|