Doubt on PHP

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

Post Reply
th.jayakumar
Forum Newbie
Posts: 6
Joined: Mon Mar 22, 2010 6:04 am

Doubt on PHP

Post by th.jayakumar »

Hello all
i am new to php can anyone tell me the meaning for the below statement

(!isset($_SESSION['myName'][$chat['from']])

Thank You in advance
User avatar
KrypticNinja
Forum Newbie
Posts: 16
Joined: Thu Mar 18, 2010 6:14 pm

Re: Doubt on PHP

Post by KrypticNinja »

Well your missing a few brackets and the if at the begining, but it's basically checking if those variables have been set.
th.jayakumar
Forum Newbie
Posts: 6
Joined: Mon Mar 22, 2010 6:04 am

Re: Doubt on PHP

Post by th.jayakumar »

This is the full syntax

please explain this to me

if (!isset($_SESSION['openChatBoxes'][$chat['from']]) && isset($_SESSION['chatHistory'][$chat['from']]))
M2tM
Forum Commoner
Posts: 41
Joined: Sat Feb 27, 2010 12:35 pm

Re: Doubt on PHP

Post by M2tM »

It's just checking if the variables are not set. $_SESSION variables are special in that they are stored as cookies for the duration of a browser session. But other than that the code is pretty straight forward.
Post Reply