Top "Unset" questions

Removing the value associated with a variable or property from the current environment.

Deleting an element from an array in PHP

Is there an easy way to delete an element from an array using PHP, such that foreach ($array) no longer …

php arrays unset
How to remove a key from a Python dictionary?

When deleting a key from a dictionary, I use: if 'key' in my_dict: del my_dict['key'] Is there …

python dictionary data-structures unset
How do I delete an exported environment variable?

Before installing gnuplot, I set the environment variable GNUPLOT_DRIVER_DIR = /home/gnuplot/build/src. During the installation, something went …

linux environment-variables unset
How to delete object from array inside foreach loop?

I iterate through an array of objects and want to delete one of the objects based on it's 'id' property, …

php foreach unset arrays
Unsetting array values in a foreach loop

I have a foreach loop set up to go through my array, check for a certain link, and if it …

php arrays foreach unset
PHP Unset Array value effect on other indexes

I am working with a PHP loop, and I had one question regarding how unset affects the array keys. This …

php arrays unset
Unset readonly variable in bash

How do I unset a readonly variable in Bash? $ readonly PI=3.14 $ unset PI bash: PI: readonly variable or is it …

bash unset
Fatal error: Cannot unset string offsets error?

Not sure why this is occurring: Basically, I have an array that contains the following arrays, see var_dump: array(2) { [0]=&…

php multidimensional-array unset
Problems deleting cookies, won't unset

I've tried searching the php manual and internet on how to delete cookies and I've tried it the exact same …

php cookies unset
PHP - unset in a multidimensional array

I have this array $output which looks like this: Array( [0] => Array( [0] => 1a [1] => 1b [2] => 1c ) [1] => Array( [0] =&…

php multidimensional-array unset