On Feb 4, 2008 8:24 PM, Richard Lynch [EMAIL PROTECTED] wrote:
function silly($var){
return isset($_SESSION[$var]) ? $_SESSION[$var] : '';
}
silly('foo');
There's also ? ipitythe('foo'); ?
--
/Dan
Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?
--
function silly($var){
return isset($_SESSION[$var]) ? $_SESSION[$var] : '';
}
silly('foo');
On Fri, February 1, 2008 10:49 am, 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.
On Feb 1, 2008 10:49 AM, Bill Guion [EMAIL PROTECTED] 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
function set_var($var)
{
echo var = $var \n;
echo \$var =
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
function set_var($var)
{
echo var = $var \n;
if (isset($_SESSION['$var']))
{
return $_SESSION['$var'];
}
else
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 =
5 matches
Mail list logo