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

Load/save to/from config to/from an array

Discussion in 'Development' started by Levi, Jun 6, 2018.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    For example
    Config:
    Code:
    
    Ranks:
        Steve: //player  name
            Noob // player rank
        Alex:
             NotNoob
    
    How would I save the player's rank from an array to config on onDisable() and load them to an array onEnable()?
     
  2. byyEmirhanWSD

    byyEmirhanWSD Witch

    Messages:
    50
    GitHub:
    EmirhanWSD
    PHP:
    $config->set("Ranks", [
      
    "Steve" => [
        
    "Noob"

      
    ],
      
    "Alex" => [
        
    "NotNoob"

      
    ]

    ]);
     
  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.