-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi All,
i have come across a strange problem with variable variables. Basicly i'm
doing the following and its not working:
$section = 'data["SITE"][0]["NAME"][0]';
$pData = 'My Site.';
${sprintf('$%s', $section)}.=$pData;
but it is not working. But if i do this:
eval('$'.$section.'.="'.addslashes($pData).'";');
it works and all is well. I don't really want to use eval() and just
wanted to see if anybody has any ideas why the above doesn't work.
Thanks,
William.
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv
iQA/AwUBO3foS639EoU2VrU1EQIPZgCcCg643+F0xDUXdsBSYAYInFStaJ0An2ID
AKL4hMIktbRsQpyVgkoeKsDo
=w0ei
-----END PGP SIGNATURE-----
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]