Hello,

I was just trying this but it doesn't work :
<?php

class a {
  public $foo = "hello world";
}

$obj = new a();
$varname = "foo";
echo $obj->$$varname;

$bar = "this is working";
$varname = "bar";
echo $$varname; // display "this is working" as expected
?>

Is it a bug or is it normal ?
I didn't find anything about it in documentation (php4 / php5).

Greg

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to