Possible Duplicate:
What does $$ (dollar dollar or double dollar) mean in PHP?
I found myself using this kind of code in one of my controllers:
foreach(get_object_vars($this->view) as $property=>$value){
$$property = $value;
}
Is there any problem with using the $$property to "localize" view properties into simple $variables?
edit:
I should add that this code is run in the scope of a view-specific method, so there's no problem of overriding local variables. This is to divert some of you guys from pointing out the problem of overriding local variables.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…