Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

include ('$joshrant');

Status
Not open for further replies.

kpdvx

Programmer
Dec 1, 2001
87
US
include ('$joshrant');

this wont work, any ideas why?
 
I think that ' makes PHP treat all text inside as it is, it doesn't translate variables into values. Try and remove the ''. //Daniel
 
Correct. You can use full ("$variable") quotes if you want, but that is only useful if you have other text along with your variable. But PHP uses the single quotes to treat everything inside as plain text, inlcuding variable names.

Also, do not confuse single quotes with the backtick (``), which does command-line execution of everything inside it. ($myvar = 'ls -la'; would make your variable string equal to the list of files in the current Unix directory). -------------------

Current reading --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top