I am working with a database created by a university professor's intern. Many of the fields have names like 'Revenues_(budget)'.
Currently when working with objects that have the fields as properties I do something like
$f = 'Revenues_(budget)';
echo $obj->$f;
This works fine but I was wondering if there might be a more elegant or at least concise way to handle these?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…