Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Calling a session variable multiple times on a page
Readie - 8:01 am on Jul 29, 2010 (gmt 0)Thread source:: http://www.webmasterworld.com/php/4178323.htm
To be fair, there is a counter argument to that Anyango - $_SESSION['foo'] stands out from the code a bit more than $foo.
Also, declaring the same variable twice is going to cause the script to consume more memory.
Brought to you by WebmasterWorld: http://www.webmasterworld.com