Page 1 of 1

echo empty string

Posted: Wed Oct 19, 2005 3:34 pm
by Ree

Code: Select all

$_SESSION['msg'] = '';
echo $_SESSION['msg'];
On my local machine, it doesn't output anything, on my host it outputs 'Array'. What is causing this?

Posted: Wed Oct 19, 2005 4:15 pm
by andre_c
if that's all of the code, it makes no sense for it to output anything other than an empty string...
is there any more code to go with it?

try doing print_r($_SESSION); and post the result

Posted: Wed Oct 19, 2005 6:25 pm
by Ambush Commander
Make sure the session is started, and try print_r'ing the $_SESSION variable itself.