PHP Object Variable variables name?
<p>I have a loop that goes from 1 to 10 and prints values in</p>

<p><code>$entity_object-&gt;field_question_1</code> through 10 so...</p>

<p><code>$entity_object-&gt;field_question_1</code>, <code>$entity_object-&gt;field_question_2</code>, etc</p>

<p>And I want to print this in this loop, how can I get the variable? I tried doing the</p>

<pre><code>$var = "entity_object-&gt;field_question_".$i;
print $$var;
</code></pre>

<p>But that did not work...</p>

<p>How can I get these values?</p>
