In message <[EMAIL PROTECTED]>, James
Keeline <[EMAIL PROTECTED]> writes
>By the way, if you wanted to keep the foreach loop, the trick is to use the $$
>or variable-variable:
>
>foreach ( $_POST as $key => $value )
>{
> $$key = $value;
>}
>
THAT is what I have been looking for, in other places as well! I used
to use that sort of technique in a very old language, Clipper, and
although it was comparitively slow in Clipper, it got me through some
tricky spots. Going off memory, I think that Clipper would need &key,
or something like that.
As a matter of interest, is it in the PHP manual? I still can't find
it!
As to your other suggestion, I need to give it some thought. There is
another similar function, whose name escapes me, where I can add a
prefix to all the variable names to obfuscate things a little.
--
Pete Clark
Work from Home
http://www.hotcosta.com/workathome.php
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/php-list/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/