Jump to content

brackets vs $$ for variables


Shayna23

Recommended Posts

Shayna23, there are a number of ways to accomplish any and everything.  Some are better practices than others, as well as being more secure and robust as others.

Some are simply better for purposes of readability and understanding.

 

I personally would choose ${$var}. Easy to see the separation!

objnoob, thank you for your response. That is what I needed. To ALL the rest of you (who all ASSUMED that I don't have access to my own PHP.ini file, who ASSUMED that I wanted to have to all of a sudden have my Registered Globals ON, who ASSUMED that I don't know about the security risks, who ASSUMED that never try to emulate an environment to make things safer, and who ASSUMED that all you have to do is make "Auth=1" and now you have root), here's a little link for ya: http://uncyclopedia.wikia.com/wiki/Assume

 

Now I know where all the people from the '90's Perl Newsgroup hang out.

I'm so, so sorry that the free professional (yes, professional... those of us with badges write PHP for a living) advice we have given you has somehow offended your delicate sensibilities.  An edible bouquet will be shipped to you, with its fruit grown and sustained, in part, by our shameful tears.

 

I think we can convince trq to end his own life, if you feel that your unique and entitled snowflake-ness needs something more than our communal genuflection.

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.