Page 1 of 1
Doubt on PHP
Posted: Mon Mar 22, 2010 6:07 am
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
Re: Doubt on PHP
Posted: Mon Mar 22, 2010 6:28 am
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.
Re: Doubt on PHP
Posted: Mon Mar 22, 2010 6:36 am
by th.jayakumar
This is the full syntax
please explain this to me
if (!isset($_SESSION['openChatBoxes'][$chat['from']]) && isset($_SESSION['chatHistory'][$chat['from']]))
Re: Doubt on PHP
Posted: Mon Mar 22, 2010 7:32 am
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.