Why am I getting a Fatal error: Call to undefined function prep_connections()?
<p>If you look at the code its clearly defined and public.</p>

<pre><code>&lt;?php
class Config {
  public function prep_connections($collection){

  }

  public function get_connctions(){
    require_once('readfile.php');

    $reader = new Readfile();

    $collections = json_decode($reader-&gt;read("../../config/database.cfg"));

    foreach($collections as $collection){
       prep_connections($collection);
    }
  }
}

$config = new Config();
$connections = $config-&gt;get_connctions();
</code></pre>
