Hi guys, I need help with config files. I can do this: PHP: foreach($this->getConfig()->get('kits') as $kitName => $kitParams){ $count = $count+1; array_push($list, $kitName); } But... i want to get the data in 'kits': 'items'. Here is a snippet of the yml, to help you get a better understanding! PHP: kits: #FORMAT '<slot>': '<id>:<amount>:<data>' pvp: kit-msg: "Kit 'PvP' Received!" #Msg To Run When a Kit is Given. items: helmet: '298' chestplate: '303' leggings: '304' boots: '301' '0': '272' '1': '260:5'
PHP: // Get kit-msgvar_dump($this->getConfig()->getNested("kits.pvp.kit-msg")); PHP: $cfg_arr = $this->getConfig()->getAll();// Get kit-msgvar_dump($cfg_arr["kits"]["pvp"]["kit-msg"]);
Nvm, i have worked it out! Just one thing... if i have an array, that is imploded, how would i get each section of it? Eg: PHP: $myString = $implode(",", $myArray);echo "Converted Array: $myString"; Code: "Convered Array: "hello,world" How would I get the words "hello" and "world" from a string "hello,world'? (Because doing [Number] from an array would for example with '0', would return the first character, not the first item in the array! Thanks.