2008/10/26 Martin Zvarík <[EMAIL PROTECTED]>:
PHP Version 5.2.4

<?
$node = '[5][1][]';
${'tpl'.$node} = 'some text';

print_r($tpl); // null
?>


I really don't like to use the EVAL function, but do I have choice??
This sucks.

Hi there,

While this question can spur some neat solutions, it raises a red flag
in that if you need to do this, you probably need to rethink things a
bit.

In cases like this it is easier for people to help if you describe the
actual problem you are trying to solve, not how you think it needs to
be solved. It could be that you don't really need weird (but
beautiful, like Jim's idea) solutions. If you explain why you believe
that you need to do this in the first place, maybe someone can suggest
something else which doesn't require a weird solution (however
beautiful).


Torben
Hi, I am aware of this, but explaining my problem in this case would take me an hour --- and eventually would lead to a) misunderstanding, b) weird solution, c) no solution...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to