05-04-2009, 09:57 PM
|
#2 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Ok so here's an example....say I want to access a session variable the "procedural way"..
echo "$_SESSION['username']";
The OOP way:
function getVar($varName)
{
return $_SESSION[$varName];
}
echo $session->getVar(username);
It almost seems like going out of your way to use OO for session data?
|
|
|
|