i have a question about code

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
goldenfaith
Registered User
Posts: 11
Joined: Thu Sep 27, 2007 8:39 pm

i have a question about code

Post by goldenfaith »

like this, why need "{ }" around var: $phpbb_root_path and $user->data['user_id']
thank you!
code1

Code: Select all

die("<p>The config.$phpEx file could not be found.</p><p><a href=\"{$phpbb_root_path}install/index.$phpEx\">Click here to install phpBB</a></p>");
code2

Code: Select all

WHERE user_id = {$user->data['user_id']}
Last edited by zeroK on Mon Jan 07, 2008 8:35 pm, edited 1 time in total.
Reason: Marked as solved
User avatar
zeroK
Former Team Member
Posts: 20964
Joined: Sun Jan 20, 2002 7:36 pm
Location: Klagenfurt / Austria
Contact:

Re: i have a question about code

Post by zeroK »

http://www.php.net/manual/en/language.types.string.php :-)

The curly braces around the variable first of all allow you to put more than just normal variables inline into a string (for instance object variables) but they also make the code more readable :-)
Image My weblog | gamerslog.com | No support via PM or ICQ or email - If you don't know a term or a program mentioned in a post -> Google is your friend
User avatar
goldenfaith
Registered User
Posts: 11
Joined: Thu Sep 27, 2007 8:39 pm

Re: i have a question about code

Post by goldenfaith »

i see. :)
thank you very much.
Locked

Return to “[3.0.x] Support Forum”