itemsEnCesta[123]= 1
itemsEnCesta[345]= 1
itemsEnCesta[567]= 1
itemsEnCesta[789]= 3
Como borro itemsEnCesta[345] ?

se me ocurrio algo asi
foreach($itemsEnCesta as $k => $v){
if ($k= 345)$k=NULL;
}
pero no funciona

| |||
Borrar valor de array tengo itemsEnCesta[123]= 1 itemsEnCesta[345]= 1 itemsEnCesta[567]= 1 itemsEnCesta[789]= 3 Como borro itemsEnCesta[345] ? ![]() se me ocurrio algo asi foreach($itemsEnCesta as $k => $v){ if ($k= 345)$k=NULL; } pero no funciona ![]() |