PHP Quiz (Set 10) PHP (Set 10) 1 / 10 Which PHP function is used to shuffle the elements of an array? shuffle() randomize() array_shuffle() mix() 2 / 10 What is the purpose of the 'compact()' function in PHP? To create a new array by combining two arrays To create an array containing variables and their values To remove duplicate values from an array To reverse the order of elements in an array 3 / 10 Which PHP function is used to remove duplicate values from an array? remove_duplicates() unique_array() array_unique() distinct() 4 / 10 What is the purpose of the 'explode()' function in PHP? To combine two strings into one string To split a string into an array of substrings based on a delimiter To find the position of a substring in a string To replace occurrences of a substring with another substring 5 / 10 What is the purpose of the 'in_array()' function in PHP? To find the index of a specific element in an array To check if a value exists in an array To retrieve the values of an array To check if a key exists in an array 6 / 10 Which PHP function is used to sort an array in descending order? desc_sort() array_desc() rsort() reverse_sort() 7 / 10 What is the purpose of the 'array_chunk()' function in PHP? To combine two arrays into a single array To split an array into chunks of specified size To merge two arrays and remove duplicates To reverse the order of elements in an array 8 / 10 What is the purpose of the 'array_key_exists()' function in PHP? To check if a value exists in an array To retrieve the keys of an array To retrieve the values of an array To check if a key exists in an array 9 / 10 Which PHP function is used to sort an array in ascending order? sort() ascending_sort() array_sort() order() 10 / 10 What is the purpose of the 'array_map()' function in PHP? To apply a callback function to each element of an array To combine two arrays into a single array To merge two arrays and remove duplicates To reverse the order of elements in an array Your score isThe average score is 0% 0% Restart quiz