isset - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: isset (/showthread.php?tid=28284) |
isset - El Forum - 03-07-2010 [eluser]Iwasignited[/eluser] Hello everyone, I want to ask a question about isset() function I tried ' if(isset($this->session->flashdata('msg'))) ' but it doesnt work, i received: 'Can't use method return value in write context' error Then I deleted the isset() and it works but I dont know why. Please give me an explanation about isset, is_null, strlen with CodeIgniter Thanks isset - El Forum - 03-07-2010 [eluser]WanWizard[/eluser] [quote author="Iwasignited" date="1267968784"]I tried ' if(isset($this->session->flashdata('msg'))) ' but it doesnt work[/quote] You can only use isset on a variable, not on a function. If this case useless as well, because the function always returns a value, so it would always be set. As per the manual, the flashdata() method returns FALSE if the requested flash variable does not exist. isset - El Forum - 03-07-2010 [eluser]Iwasignited[/eluser] OK i see. Thank you |