我的会话未设置有问题,因为我已经在一个函数上完成了它,并且只有内部参数删除了选择值 id。
看一看:
/***
* @name DeleteItem
* @date 04.10.2014
* @param The array that contains the element to delete
* @param The id of the selected index
* @param The name of the button that start the delete
* @version 1.0
* @description Delete an item to the select
*/
function DeleteItem($array,$SelectID,$btnDelete) {
//The delete button was clicked?
if(isset($_POST[$btnDelete]))
{
//Find the element with the id and delete the value
foreach ($array as $idx =>$value)
{
if ($idx == $SelectID)
{
unset($array,$SelectID);
}
}
return $array;
}
谢谢 - 我确信这很简单。