accessing a member in a class as a string PHP
<p>in PHP, can we do the following ?</p>

<pre><code>class a{
    public $id;
}
</code></pre>

<p>can we access this field with something like this,</p>

<pre><code>$x='id';
$aObj=new a();
$aObj-&gt;$x=1;//or $aObj-&gt;"id"=1
</code></pre>
