|
Posted by Steve on 04/16/07 05:47
"Steve" <no.one@example.com> wrote in message
news:m_DUh.171$fK7.124@newsfe02.lga...
| hey genious, here's an RBI:
|
| foreach (
| array(
| $section ,
| 'newImage' ,
| "${section}_width" ,
| "${section}_height"
| )
| as $val
| ){ $this->$val =& ${$val}; }
|
| what do you intend to do with this lil' gem, eh? you do realize you'll get
| the same results by just:
|
| $this->val =& "${section}_height";
make that:
$this->$val =& ${"${section}_height"};
but you get my point. if you want to make the values into variables, do
it...but don't confuse the issue of what $this->$val is. this is right up
there with magic numbers! gotta love coders like you. ;^)
Navigation:
[Reply to this message]
|