Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

why the $$ on some variables


ctbhost

Recommended Posts

im just learning PHP and Mysql and was looking through the code of oscommerce to see how it works and found a lot of variables have an additional $ at the front of them

 

for example

-------------------------------------------------------------------------------------------

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {

global $$link;

 

if (USE_PCONNECT == 'true') {

$$link = mysql_pconnect($server, $username, $password);

} else {

$$link = mysql_connect($server, $username, $password);

}

 

if ($$link) mysql_select_db($database);

 

return $$link;

}

 

------------------------------------------------------------------------------------

why is it like this

 

sorry if its a silly question

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...