PHP Object Variable variables name?
Actually you need to take the variable outside the string like this in order to those solutions to work:
$var="field_question_".$i;
$entity_object->$var;
Or
$entity_object->{"field_question_".$i}
First of all, arrays are more suitable for what you want to do.
The answer to you question: print $entity_object->{"field_question_$i"};
This should work:
$var="field_question_$i";
$entity_object->$var;