1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved Array in YAML config

Discussion in 'Development' started by UnknownOre, Feb 10, 2019.

  1. UnknownOre

    UnknownOre Silverfish

    Messages:
    21
    GitHub:
    UnknownOre
    i want to create a array in a YAML config look like this
    Code:
    [0]=>
    array(2) {
    [0]=>
    string(4) "Dirt"
    [1]=>
    int(3)
    [2]=>
    int(1)
    }
    [1]=>
    array(2) {
    [0]=>
    string(4) "Dirt"
    [1]=>
    int(3)
    [2]=>
    int(1)
    }
    
    i have no idea how to do it, i have searched alot on the forums/github and i didn't find any good example
     
  2. Gianluxx

    Gianluxx Slime

    Messages:
    94
    GitHub:
    Gianluxx
    create a config
    $data = [["Dirt", 3, 1], ["Dirt", 3, 1]];
    $config->setAll($data);
    $config->save();
     
    UnknownOre likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.