referencing class variable by a string
<p>This is some pseudo code represents my code which you wouldn't inderstand scope.</p>

<p>Class Tester has private vars, hold classes.
Array holds the base name of var.
Function bar attempts to contruct the variable in string from, then use it.
If this can't be done I understand, but i'm just constructing a variable name.</p>

<pre><code>Class Tester{

     private $preClass1post = new TestClass1();

     private $preClass2post = new TestClass2();;

     private $preClass2post = new TestClass2();;

     public $classBasicNames = array('Class1','Class2','Class3');

     function Bar(){
          foreach($classBasicNames as $classBasicName){

             $fullClassName = 'PreText'.classBasicName.'PostText';

             $fullClassName-&gt;DoWork();
             //always throws object does not exist
          }

}

}


                    //actual code for context
            $mapperName = 'mapper'.$entityName.'Stat';
            echo $mapperName;
            $dbos = $this-&gt;{$mapperName}-&gt;fetchAll($options);
</code></pre>
