View Single Post

  #4 (permalink)  
Old 10-09-2004
Geoff Berrow
 
Posts: n/a
Default Re: Assign value to variable

I noticed that Message-ID:
<d3354680.0410080907.4c50e18b@posting.google.com > from Mike contained
the following:

>ie. somefunc("sn", "Shore")
>
>Would create the variable $sn and assign the value "Shore" to it.


function somefunc($var,$value){
global $$var;
$$var=$value;
}
somefunc("sn", "Shore");
print $sn;

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Reply With Quote