Page 1 of 1

Please Explain

Posted: Tue Mar 23, 2010 4:31 am
by th.jayakumar
Can Anyone explain the meaning for the below statement

if (!isset($_SESSION['chatHistory'][$_POST['to']]))
{
$_SESSION['chatHistory'][$_POST['to']] = '';
}

what they are checking in the above statement

what is the meaning for this below statement

unset($_SESSION['tsChatBoxes'][$_POST['to']]);

Re: Please Explain

Posted: Tue Mar 23, 2010 7:34 am
by M2tM
Stop asking the same question over and over again.

Either learn how to program, read some manuals, look up the individual statements you are having difficulty with... Or stop mucking about in code.

Re: Please Explain

Posted: Tue Mar 23, 2010 7:43 am
by th.jayakumar
am not mucking the code..
i dint understand those lines
am converting some logic from pho to c#

Re: Please Explain

Posted: Tue Mar 23, 2010 7:47 am
by M2tM
You have asked in every single post what a line containing "isset" in regards to some session variable does. You are blindly thrashing about and asking redundant questions. Stop doing that and actually learn a little bit on your own and come back with a real question.

Have problems with isset? Search php.net or google for it.

http://ca.php.net/manual/en/function.isset.php

Have a problem with sessions? Learn about them.

http://ca.php.net/manual/en/book.session.php

This is one of the most readily available forms of documentation that exists for any language and asking the same silly question about similar lines of code is a waste of everybody's time.

Re: Please Explain

Posted: Tue Mar 23, 2010 8:19 am
by th.jayakumar
Thank u