> -----Original Message-----
> From: Douglas Douglas [mailto:[EMAIL PROTECTED]
> Sent: 14 June 2003 00:57
>
> Thanks for the explanation, but I think this is a
> different case, isn't? I'm not trying to do this
> ${$_POST}, I'm trying to make this string $_POST.
Then why not just make it:
$var = '$_'.$method;
(Forgive me if I've misunderstood and that's not what you mean!)
> And I have another question. Why does this code work?
>
> <?php
> echo '<pre>';
> print_r($_POST);
> echo '</pre><br><br>';
> $method = 'POST';
> $data = ${'_'.$method};
> echo '<pre>';
> print_r($data);
> echo '</pre><br><br>';
> ?>
H'mm, interesting -- that does seem to be in contradiction of the Warning I pointed
out before. You're definitely using the variable variables trick to access a
superglobal! Sorry, I'm stumped on this one... ;(
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php