You can use the array_filter() function in PHP to remove all elements from an array that do not start with a certain string.