PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Ree
Forum Regular
Posts: 592 Joined: Fri Jun 10, 2005 1:43 am
Location: LT
Post
by Ree » Wed Oct 19, 2005 3:34 pm
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?
andre_c
Forum Contributor
Posts: 412 Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah
Post
by andre_c » Wed Oct 19, 2005 4:15 pm
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
Ambush Commander
DevNet Master
Posts: 3698 Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US
Post
by Ambush Commander » Wed Oct 19, 2005 6:25 pm
Make sure the session is started, and try print_r'ing the $_SESSION variable itself.