215k views
4 votes
You can deal with gaps in an PHP array in all but one of the following ways. Which one is it? a. Use the array_values() function to remove all gaps and re-index the array. b. Use a foreach loop to process the array, which skips elements that contain nulls. c. Use a for loop that contains extra code that skips elements that contain nulls. d. Use the array_fill() function to replace all gaps in the array with empty strings

User Azazul
by
5.4k points

1 Answer

7 votes

Answer:

D. Use the array_fill function to replace all gaps in the array with empty strings

Step-by-step explanation:

The other method can be employed if one wants to deal with gaps in an PHP array except the Use of the array_fill function to replace all gaps in the array with empty strings.

User Qinyu
by
4.8k points