PHP ZipArchive deleteIndex() Function
The ZipArchive::deleteIndex() function is an inbuilt function in PHP that is used to delete an entry from the zip archive using its index.
bool ZipArchive::deleteIndex(int $index)
Parameters: This function accepts a single parameter that is described below:
- $index: This parameter holds the index number of entries that need to delete.
Return Value: This function returns True on Success and False on Failure.
Example 1: The following code demonstrates the delete() function. It deletes the third file as shown in the output.
Example 2: The following code demonstrates the delete() function with index 2.
My Personal Notes arrow_drop_up
Please Login to comment...