daboymac Posted October 25, 2007 Share Posted October 25, 2007 i thought {} were only used to display an array element as a string Quote Link to comment Share on other sites More sharing options...
dbo Posted October 25, 2007 Share Posted October 25, 2007 It's just a way of letting you embed it directly in a string. So like: echo "<a href='{$_SERVER['PHP_SELF']}'>Link</a>"; as opposed to: echo "<a href='" . $_SERVER['PHP_SELF'] . "'>Link</a>"; Quote Link to comment Share on other sites More sharing options...
dbo Posted October 25, 2007 Share Posted October 25, 2007 err and $_SERVER['PHP_SELF'] is an array element. It just happens to be an associative array. Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted October 25, 2007 Share Posted October 25, 2007 You can see more information on it on the following link http://www.php.net/manual/en/language.types.string.php#language.types.string.parsing.complex Quote Link to comment Share on other sites More sharing options...
daboymac Posted October 28, 2007 Author Share Posted October 28, 2007 ohhh ok...i understand. thanks a bunch. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.