Connecting Tech Pros Worldwide Help | Site Map

$$key = $value?

  #1  
Old March 24th, 2008, 10:25 AM
Gilles Ganault
Guest
 
Posts: n/a
Hello

I'm reading articles on how to validate forms, and happened on the
following section:

foreach($_POST as $key=>$value) {
$$key = $value;
}

http://www.phphacks.com/content/view/31/33/

What does "$$key=$value" do?

Thank you.
  #2  
Old March 24th, 2008, 12:45 PM
Gilles Ganault
Guest
 
Posts: n/a

re: $$key = $value?


On Mon, 24 Mar 2008 03:20:06 -0700 (PDT), ELINTPimp
<smsiebe@gmail.comwrote:
Quote:
>$$key is a variable variable:
>http://us3.php.net/language.variables.variable
Thanks for the answer.
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Key-Value pair list - not sorted Sehboo answers 2 March 22nd, 2007 04:15 PM
function to extract key/value pairs? Stan McCann answers 3 October 27th, 2006 02:45 PM
Strongly Typed Key Value Collections within a For Next loop Simon answers 5 May 1st, 2006 11:29 AM
Implementing a key/value pair collection...with a catch Jeff L. answers 3 November 20th, 2005 12:40 PM
C data container similar to Perl style key-value array? Robert Oschler answers 5 November 14th, 2005 09:09 PM