Topic: Concatenate variable variables from instance vars?

Hi there

How do I concatenate variable variables from instance vars?
Thanks...much appreciated

<?php
class myClass {
   var $testme1 = "one";
   var $testme2 = "two";
   var $testme3 = "Three";

    function __construct(){
        echo "<h2> Concat test </h2> ";

       
    }
}

$myInstance = new myClass();
   
for ( $i=1; $i <= 4; $i++) {
    $testme = ${"testme"."$i"};
    $myVar = ${"testme"."$i"};
    echo $this->$myVar; //???????????????????????????????????????????
}

Last edited by altergothen (January 12, 2009 4:57 am)

Vote up Vote down