I have a $_POST array that results from selecting (in this case) 3 rows from a displayed HTML table in which each row has a checkbox. The IDs are unique identifiers for each row.
Array
(
[checkbox] => Array
(
[0] => 001403166
[1] => 001407509
[2] => 001407541
)
)
I want to gather the IDs into variables so that I can go back and pull the full rows from mysql for processing (e.g., delete, etc.) — something like ~
$var1 = 001403166
$var2 = 001407509
$var3 = 001407541
I haven’t a clue as to how to do this (not unusual), or even what it is called so that I can find information about it. Thanks for any help!
The extract function should do almost what you’re asking :
Something like this, I suppose, should do the trick :
Only thing is that you’ll get variables called
$var_0,$var_1,$var_2:0, and not from1, as the keys in$_POST['checkbox']start from0._‘ between$varand the number.Note : before using
extract, you should make sure$_POST['checkbox']only contains “clean” data !