Re: Pass Variable Names to a Function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bill Guion wrote:
I would like to use a function to check to see if a session variable is set and return the session variable if it is set, and return blank if not. Something like

You really don't need a function for this:

// Could use null instead of false
$variable = isset($_SESSION[$name]) ? $_SESSION[$name] : false;

--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and Helpdesk software for £299pa hosted for you -
no installation, no maintenance, new features automatic and free

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux