Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

unset()

Comments in 'Plugin Development' started by Primus, Sep 6, 2015.

  1. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    I save signs in array like this:

    ["151:75:213:Factions"]=>
    array(2) {
    ["rank"]=>
    string(5) "Owner"
    ["cost"]=>
    string(3) "500"
    }

    using unset($this->signs['151:75:213:Factions']); Does not remove it.
    Last edited: Sep 16, 2016
  2. Svile
    Offline

    Svile Active Member

    Joined:
    Mar 30, 2015
    Posts:
    239
    Minecraft User:
    svile
    Is 151:75:213:Factions an element of the array signs ?
  3. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    It's the key
    $key => $value
  4. Svile
    Offline

    Svile Active Member

    Joined:
    Mar 30, 2015
    Posts:
    239
    Minecraft User:
    svile
    Example:
    PHP:
    $array=['string0''string1''string2'];

    unset(
    $array[array_search('string1'$array)]);
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Issue already fixed.
    Primus and Andrey Nazarchuk like this.

Share This Page

Advertisement