View Single Post
Old 05-04-2009, 09:57 PM   #2 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

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?
allworknoplay is offline  
Reply With Quote