Originally Posted by
kows
well, this is why I said you would need to add validation of your own. but, first of all.. asdf1 is a value, not the name of a section. you would need to input "1" as a value because the section's name is 1, and one of the "keys" underneath that section is "name," and name's value is asdf1.
now, you're getting an undefined index because the $this->ini array (within someClass) has the keys 1 and 2, and each of those keys are an array themselves -- each with a key named name. name's value is retrieved by calling $this->ini[section]['name'], where section is either 1 or 2. section 1 would return asdf1, and section 2 would return asdf2.
you can avoid this error by either making another method that checks whether or not a section exists (sectionExists()?), or by just checking whether $this->ini[section] is set within the connect() method before doing anything (just by calling isset() with $this->ini[section] as the parameter). sectionExists() would just do the same thing, but would be in a separate method so that you could use it in other situations or whatever.
hope that makes sense. as always, ask questions.