Question 1:
The explode function seperates a variable into more usable array by way of some common deliminater.
For example, within a string you have:
$string = "Apple😮range:Banana😛each"
Each fruit is seperated by an ':', you can use the explode function to exploit that and seperate the data into an array.
$fruit = explode(":",$string);
returns:
$fruit[0] = "Apple";
$fruit[1] = "Orange";
$fruit[2] = "Banana;
$fruit[3] = "Peach";
Question 2: Yes, you can batch delete with MySQL. For example, when you run your SQL statements within PHP, you typically do something like this:
$table_name = "fruit";
$fruit_name = "Apple";
$color = "Red";
Some additional database connection code, which I'm leaving out for space reasons.
$sql = "
INSERT INTO $table_name
(Fruit_Name, Color)
VALUES
(\"$fruit_name\", \"$color\")
";
This would insert 'Apple' and 'Red' into the database.
Instead you would do the following:
$sql = "
DELETE FROM $table_name
";
This statement would delete everything within the 'Fruit' table. You could add some restraits to it, so that it would only delete the 'Red' fruits if you did something like this:
$sql = "
DELETE FROM $table_name
WHERE $color = "Red"
";
Question 3:
I'm not sure what you are talking about.