daboymac Posted October 25, 2007 Share Posted October 25, 2007 i thought {} were only used to display an array element as a string Link to comment https://forums.phpfreaks.com/topic/74728-solved-what-does-this-mean-_serverphp_self/ 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>"; Link to comment https://forums.phpfreaks.com/topic/74728-solved-what-does-this-mean-_serverphp_self/#findComment-377765 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. Link to comment https://forums.phpfreaks.com/topic/74728-solved-what-does-this-mean-_serverphp_self/#findComment-377770 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 Link to comment https://forums.phpfreaks.com/topic/74728-solved-what-does-this-mean-_serverphp_self/#findComment-377844 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. Link to comment https://forums.phpfreaks.com/topic/74728-solved-what-does-this-mean-_serverphp_self/#findComment-379814 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.