Solved Array in YAML config

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

  1. UnknownOre

    UnknownOre Spider

    Messages:
    7
    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 Silverfish

    Messages:
    15
    GitHub:
    Gianluxx
    create a config
    $data = [["Dirt", 3, 1], ["Dirt", 3, 1]];
    $config->setAll($data);
    $config->save();
     
    UnknownOre likes this.

Share This Page

  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.