To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > PHP Help > Coding

Coding Help with PHP coding

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-18-2003, 01:30 PM   #1
Volitics
Senior Member
 
Volitics's Avatar
 
Join Date: Jun 2003
Posts: 248
Question What Does A Double Dollar Sign Mean?

Can anyone tell me what a "double dollar sign" or a "double scalar" means?

Below is a snippet of code (one of the variables has a "double dollar sign") that I have been trying to figure out:
PHP Code:
$dvf1  = "image$c".'_name';
$ofn   = $$dvf1;
I think that it (the "double dollar sign") assigns the value of one variable to another variable - but I'm not sure. I've got a few PHP books - none of them tell what it means.

Thanks.

Volitics
Volitics is offline   Reply With Quote
Old 08-18-2003, 01:47 PM   #2
superwormy
Senior Member
 
Join Date: Aug 2002
Location: Connecticut
Posts: 1,557
It makes a variable with a name equal to the value of the original variable. If that makes any sense... works like this:


$var = "keith";

$$var = "palmer";

print ($keith);
// The output is: palmer


So in this case, we made a new variable, and the new variables name was the value of $var. We assigned "palmer" to the variable by the name of $var's value.

Hope tha thelped...
superwormy is offline   Reply With Quote
Old 08-18-2003, 04:40 PM   #3
Volitics
Senior Member
 
Volitics's Avatar
 
Join Date: Jun 2003
Posts: 248
superwormy;

That does help. Thanks.

Best Regards;

Volitics
Volitics is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 01:14 PM.






Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.