Re: [PHP] $myobject-$$varname doens't work ??

2004-05-09 Thread Aidan Lister
Richard, I think you need to read the questions more accurately - your last two replies have been somewhat incorrect Richard Harb [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Try echo $obj-$varname; -Original Message- From: greg Sent: Sunday, May 9, 2004, 9:21:52 AM

Re: [PHP] $myobject-$$varname doens't work ??

2004-05-09 Thread Aidan Lister
Ooops, actually he was pretty ambiguous, please disregard my previous comment :) Richard Harb [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Try echo $obj-$varname; -Original Message- From: greg Sent: Sunday, May 9, 2004, 9:21:52 AM Hello, I was just trying this

[PHP] $myobject-$$varname doens't work ??

2004-05-09 Thread greg
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

Re: [PHP] $myobject-$$varname doens't work ??

2004-05-09 Thread Richard Harb
Try echo $obj-$varname; -Original Message- From: greg Sent: Sunday, May 9, 2004, 9:21:52 AM 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;