PHP Functions
PHP Functions - Important Points
11. | Which PHP function is used to get the last error message? |
---|
A. error_get_last()
B. last_error()
C. get_error()
D. error_message()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
The error_get_last() function is used to get the last error message in PHP.
12. | Which PHP function is used to remove elements from an array? |
---|
A. unset()
B. remove()
C. delete()
D. pop()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
The unset() function is used to remove elements from an array in PHP.
13. | Which PHP function is used to convert a string to lowercase? |
---|
A. strtolower()
B. to_lowercase()
C. lower()
D. convert_lower()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
The strtolower() function is used to convert a string to lowercase in PHP.
14. | Which PHP function is used to sort an array in ascending order? |
---|
A. sort()
B. ascending()
C. order()
D. arrange()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
The sort() function is used to sort an array in ascending order in PHP.
15. | Which PHP function is used to check if a file exists? |
---|
A. file_exists()
B. exists_file()
C. check_file()
D. file_check()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
The file_exists() function is used to check if a file exists in PHP.