How can you delete the first 4 elements of an array in PHP?

To delete the first 4 elements of an array in PHP, you can use the array_slice() function. This function returns a portion of an array starting from the specified offset. By setting the offset to 4, you can effectively remove the first 4 elements from the array.

$array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
$array = array_slice($array, 4);
print_r($array);